[Python-3000] PEP 3129: Class Decorators (original) (raw)
Guido van Rossum guido at python.org
Mon May 7 21:16:27 CEST 2007
- Previous message: [Python-3000] PEP 3129: Class Decorators
- Next message: [Python-3000] PEP 3125 -- a modest proposal
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 5/7/07, Collin Winter <collinw at gmail.com> wrote: [...]
This PEP proposes class decorators, an extension to the function and method decorators introduced in PEP 318. [...] The semantics and design goals of class decorators are the same as for function decorators ([#semantics], [#goals]); the only difference is that you're decorating a class instead of a function. The following two snippets are semantically identical: ::
class A: pass A = foo(bar(A))
@foo @bar class A: pass
I'm +1 on this PEP.
-- --Guido van Rossum (home page: http://www.python.org/~guido/)
- Previous message: [Python-3000] PEP 3129: Class Decorators
- Next message: [Python-3000] PEP 3125 -- a modest proposal
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]