[Python-3000] PEP 3129: Class Decorators
Guido van Rossum
guido at python.org
Mon May 7 21:16:27 CEST 2007
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/)
More information about the Python-3000
mailing list