Are decorators really that different from metaclasses...

Robert Brewer fumanchu at amor.org
Wed Aug 25 00:21:20 EDT 2004


Anthony Baxter wrote:
> Class decorators are not in 2.4, because you can do most things you'd
> do with a class decorator by using a metaclass, but in a completely
> different way. In my opinion, class decorators _should_ be in 2.4,
> because they're a much saner way to handle many things that require a
> metaclass today.

For various definitions of "should", I'd say at this point they should
be in 2.5. Nothing's stopping that, AFAICT. Give function decorators a
trial run and then try class decorators. I prefer that schedule even
though I personally have use cases for class decorators and none for
functions...


Robert Brewer
MIS
Amor Ministries
fumanchu at amor.org



More information about the Python-list mailing list