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.
References
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'