pytilities.delegation.decorators
Various decorators to ease delegation
-
pytilities.delegation.decorators.mapped(mapping, *accesses)
Includes the decorated attribute in the specified mapping.
The class on which the attribute resides, must be decorated with
mapped_class.
It maps according to: mapping[access, attr_name] = attr_name
| Parameters: |
- mapping (MutableMapping) – mapping instance to map new mapping with
- accesses (tuple) – the kind of access to map. Default is (‘get’, ‘set’,
‘delete’)
|
-
pytilities.delegation.decorators.mapped_class(cls=None)
Class decorator, required by mapped to work