sytuple API

sytuple is the builtin datatype in sympathy used for representing tuples. A tuple is an ordered container type whose the elements can be of different types. For example, (table, text) is the data type for a two element tuple representing a pair of a table and a text.

If the port type of a node contains (,) the resulting port will contain tuple type data.

class sytuple(container_type)

Container type, for example, sympathy.api.types.from_string('(table, text)'), this determines the type of content allowed. Note that container type includes the type of the tuple itself.


Return a new sytuple, not connected to any file. The same container type is used for the new sytuple.

source(other, shallow=False):

Fill with elements from other sytuple.


Return a shallow copy.


Return a deep copy.


Return the length.


Return item at index.

__setitem__(index, item):

Set item at index.


Return iterator of contained items.


Return string representation.