Tuple

class audobject.resolver.Tuple[source]

Tuple resolver.

Encodes tuple as a list.

Examples

>>> resolver = Tuple()
>>> value = (1, 'a')
>>> value
(1, 'a')
>>> encoded_value = resolver.encode(value)
>>> encoded_value
[1, 'a']
>>> decoded_value = resolver.decode(encoded_value)
>>> decoded_value
(1, 'a')

__hash__()

Tuple.__hash__()

Return hash(self).

decode()

Tuple.decode(value)[source]

Decodes list as tuple.

Parameters

value (list) – list

Return type

tuple

Returns

tuple

encode()

Tuple.encode(value)[source]

Encodes tuple as list.

Parameters

value (tuple) – tuple

Return type

list

Returns

list

encode_type()

Tuple.encode_type()[source]

Return encoded type.

Return type

type

Returns

encoded type

root

Tuple.root

Root folder.

Returns root folder when object is serialized to or from a file, otherwise None is returned.

Returns

root directory