decorators - more than just syntactic sugar
Duncan Booth
duncan.booth at invalid.invalid
Mon Aug 13 07:32:34 EDT 2007
"BJörn Lindqvist" <bjourne at gmail.com> wrote:
> On 8/11/07, Helmut Jarausch <jarausch at skynet.be> wrote:
>> How can I find out the predefined decorators?
>
> There are two in the standard library, @classmethod for declaring
> class methods and @staticmethod for declaring static methods. They are
> listed at the built ins page
> http://docs.python.org/dev/lib/built-in-funcs.html, unpedagogically
> not separated from ordinary functions.
>
>
There are at least two other decorators in the standard library:
functools.wraps
contextlib.contextmanager
More information about the Python-list
mailing list