mango.fields.compounds module

class mango.fields.compounds.Double2Field(*args, **kwargs)

Bases: mango.fields.generic.DoubleField

The Double2Field can be used to set and retrieve double compound values. If the provided value is not a list containing float or integer values a TypeError will be raised. The fixed length of the compound is 2.

compound = 'UV'
default_value = (0.0, 0.0)
validate_child_is_int_or_float(value, instance)
Raises:TypeError – When the value is not a list.
validate_length(value, instance)
Raises:ValueError – When the value is not a list.
class mango.fields.compounds.Double3Field(*args, **kwargs)

Bases: mango.fields.generic.DoubleField

The Double3Field can be used to set and retrieve double compound values. If the provided value is not a list containing float or integer values a TypeError will be raised. The fixed length of the array is 3.

compound = 'XYZ'
default_value = (0.0, 0.0, 0.0)
validate_child_is_int_or_float(value, instance)
Raises:TypeError – When the value is not a list.
validate_length(value, instance)
Raises:ValueError – When the value is not a list.
class mango.fields.compounds.Degree3Field(*args, **kwargs)

Bases: mango.fields.generic.DegreeField

The Degree3Field can be used to set and retrieve angle compound values. If the provided value is not a list containing float or integer values a TypeError will be raised. The fixed length of the array is 3.

compound = 'XYZ'
default_value = (0.0, 0.0, 0.0)
validate_child_is_int_or_float(value, instance)
Raises:TypeError – When the value is not a list.
validate_length(value, instance)
Raises:ValueError – When the value is not a list.
class mango.fields.compounds.Boolean3Field(*args, **kwargs)

Bases: mango.fields.generic.BooleanField

The Boolean3Field can be used to set and retrieve boolean compound values. If the provided value is not a list containing boolean values a TypeError will be raised. The fixed length of the array is 3.

compound = 'XYZ'
default_value = (True, True, True)
validate_child_is_bool(value, instance)
Raises:TypeError – When the value is not a list.
validate_length(value, instance)
Raises:ValueError – When the value is not a list.