Better Living Through Python With Decorators
As of now, writing custom decorators correctly requires some experience and it
is not as easy as it could be. For instance, typical implementations of
decorators involve nested functions, and we all know that flat is better than
nested. Moreover, typical implementations of decorators do not preserve the
signature of decorated functions, thus confusing both documentation tools and
developers.
The aim of the decorator module it to simplify the usage of decorators for the
average programmer, and to popularize decorators usage giving examples of
useful decorators, such as memoize, tracing, redirecting_stdout, locked, etc.
- Sources inherited from project devel:languages:python
- Devel package for openSUSE:Factory
-
7
derived packages
- Links to openSUSE:Factory / python-decorator
- Download package
-
Checkout Package
osc -A https://api.opensuse.org checkout home:Tomcat42/python-decorator && cd $_
- Create Badge
Refresh
Refresh
Source Files
Filename | Size | Changed |
---|---|---|
_link | 0000000151 151 Bytes | |
decorator-5.0.9.tar.gz | 0000034544 33.7 KB | |
python-decorator.changes | 0000008930 8.72 KB | |
python-decorator.spec | 0000002223 2.17 KB |
Revision 48 (latest revision is 53)
Dirk Mueller (dirkmueller)
committed
(revision 48)
- update to 5.0.9: * Fixed a test breaking PyPy. Restored support for Sphinx. * Made the decorator module more robust when decorating builtin functions lacking dunder attributes, like `dict.__setitem__`. * The decorator module was not passing correctly the defaults inside the `*args` tuple, thanks to Dan Shult for the fix. * The decorator module was not copying the __module__ attribute anymore. * Dropped support for Python < 3.5 with a substantial simplification of the code base (now building a decorator does not require calling "exec"). Added a way to mimic functools.wraps-generated decorators.
Comments 0