4.5. foundations.decorators
decorators.py
- Platform:
- Windows, Linux, Mac Os X.
- Description:
- Defines Foundations package generic decorators objects.
Others:
4.5.1. Module Attributes
-
foundations.decorators.LOGGER
4.5.2. Functions
-
foundations.decorators.executionTime(object)[source]
Implements execution timing.
Any method / definition decorated will have it’s execution timed through information messages.
Parameters: | object (object) – Object to decorate. |
Returns: | Object. |
Return type: | object |
-
foundations.decorators.memoize(cache=None)[source]
Implements method / definition memoization.
Any method / definition decorated will get its return value cached and restored whenever called with the same arguments.
Parameters: | cache (dict) – Alternate cache. |
Returns: | Object. |
Return type: | object |
-
foundations.decorators.systemExit(object)[source]
Handles proper system exit in case of critical exception.
Parameters: | object (object) – Object to decorate. |
Returns: | Object. |
Return type: | object |