atom.tuple

class atom.tuple.Tuple(item=None, default=())[source]

Bases: atom.catom.Member

A member which allows tuple values.

If item validation is used, then assignment will create a copy of the original tuple before validating the items, since validation may change the item values.

__init__(item=None, default=())[source]

Initialize a Tuple.

Parameters :

item : Member, type, or tuple of types, optional

A member to use for validating the types of items allowed in the tuple. This can also be a type object or a tuple of types, in which case it will be wrapped with an Instance member. If this is not given, no item validation is performed.

default : tuple, optional

The default tuple of values.