colour.utilities.Structure

class colour.utilities.Structure(*args, **kwargs)[source]

Bases: dict

Defines a dict-like object allowing to access key values using dot syntax.

Other Parameters
  • *args (list, optional) – Arguments.

  • **kwargs (dict, optional) – Key / Value pairs.

Methods

References

[Manb]

Examples

>>> person = Structure(first_name='John', last_name='Doe', gender='male')
>>> # Doctests skip for Python 2.x compatibility.
>>> person.first_name  
'John'
>>> sorted(person.keys())
['first_name', 'gender', 'last_name']
>>> # Doctests skip for Python 2.x compatibility.
>>> person['gender']  
'male'
__init__(*args, **kwargs)[source]

Initialize self. See help(type(self)) for accurate signature.

__weakref__

list of weak references to the object (if defined)