[Python-Dev] Class decorators
greg.ewing at canterbury.ac.nz
Tue Mar 28 07:40:52 CEST 2006
Phillip J. Eby wrote:
> It registers a function as the __metaclass__ by poking it into the f_locals
> of the frame that's defining the class.
That is stunningly brilliant! I'd nominate it for
Hack of the Year if there were such an award.
It's far too magical for me to feel like actually
using it, though. Class decorators would be so much
more straightforward and explicit.
More information about the Python-Dev