| Author | SHA1 | Date | |
|---|---|---|---|
|
2d847b4ccd |
|||
|
0d3008d656 |
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
2d847b4ccd |
jw.util, jwutils: Follow jw-pkg's move to isort
"make format", as defined by jw-pkg, now sorts the order or imports, too. So do that and commit. Signed-off-by: Jan Lindemann <jan@janware.com> |
|||
|
0d3008d656 |
func_tools: Add module
Add the func_tools module for giving the private_method decorator a home. The decorator enforces that a method can only be called by methods belonging to the same class. It inspects the call stack at runtime and raises AttributeError if the caller is not a method of the owning class. When decorating a class, the decorator scans all other class members for functions (including static, class, and other private methods) and records their code objects as allowed callers. The __get__() method returns a wrapper that checks the current frame's code object against this set before dispatching to the actual method. Signed-off-by: Jan Lindemann <jan@janware.com> |