colour.utilities.Structure#
- class colour.utilities.Structure(*args: Any, **kwargs: Any)[source]#
Bases:
dict
Define a
dict
-like object allowing to access key values using dot syntax.Methods
References
[Rak17]
Examples
>>> person = Structure(first_name="John", last_name="Doe", gender="male") >>> person.first_name 'John' >>> sorted(person.keys()) ['first_name', 'gender', 'last_name'] >>> person["gender"] 'male'
- __delattr__(name: str)[source]#
Delete the attribute with given name.
- Parameters:
name (str) – Name of the attribute to delete.
- __getattr__(name: str) Any [source]#
Return the value from the attribute with given name.
- Parameters:
name (str) – Name of the attribute to get the value from.
- Return type:
- Raises:
AttributeError – If the attribute is not defined.
- __weakref__#
list of weak references to the object