module documentation
Undocumented
Class | cachedproperty |
Provides a cached property equivalent to the stacking of @cached and @property, but more efficient. |
Function | deprecated |
This is a decorator which can be used to mark functions as deprecated. It will result in a warning being emitted when the function is used. |
Function | inference |
record the inference path and avoid infinite recursion |
Function | log |
decorators to log the yield result for any func the yielded result is parsed as first argument. Use {0} in the string to place the yielded result. E.g. >>> @log_yielded_result("the function foo returned {0}... |
Function | lru |
cache the infer() returned results by comparing the state of the context. It's different than @functools.lru_cache since it's not comparing the object itself, but the state. All the relevant attribute in context are hashed, along with the unique_id of context for comparing different instances. |
Function | yield |
Undocumented |
Constant | BASE |
Undocumented |
This is a decorator which can be used to mark functions as deprecated. It will result in a warning being emitted when the function is used.
decorators to log the yield result for any func the yielded result is parsed as first argument. Use {0} in the string to place the yielded result. E.g. >>> @log_yielded_result("the function foo returned {0}. Extra is:{1}, {2}", ... "extra1", "extra2") ... def foo(): ... yield from [1, 2, 3]