[Python-Dev] Possible rough edges in Python 3 metaclasses (was Re: Language reference updated for metaclasses) (original) (raw)
Joao S. O. Bueno jsbueno at python.org.br
Tue Jun 5 14:21:39 CEST 2012
- Previous message: [Python-Dev] Possible rough edges in Python 3 metaclasses (was Re: Language reference updated for metaclasses)
- Next message: [Python-Dev] issues with installing and importing rdflib and rdfextras in python and eclipse pydev
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 4 June 2012 21:10, PJ Eby <pje at telecommunity.com> wrote:
> I only use metaclass in 2.x for this because it's the only way for > code > executed in a class body to gain access to the class at creation time. >
PJ, it maybe just me, but what does this code do that can't be done at the metaclass' new method?
You might have to rewrite some method-decorators, so that they just mark a method at class body execution time, and then, whatever the decorator used to do at this time, would be done at meta's new - I have this working in some code (and in Python 2 already).
js -><-
- Previous message: [Python-Dev] Possible rough edges in Python 3 metaclasses (was Re: Language reference updated for metaclasses)
- Next message: [Python-Dev] issues with installing and importing rdflib and rdfextras in python and eclipse pydev
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]