This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author amaury.forgeotdarc
Recipients amaury.forgeotdarc, lpd
Date 2008-01-04.08:39:41
SpamBayes Score 0.042820733
Marked as misclassified No
Message-id <[email protected]>
In-reply-to
Content
When designing a metaclass, you should override __new__, not __init__:

class MetaNode(type):
   def __new__(cls, name, bases, cdict):
       cdict['z'] = name
       return type.__new__(cls, name, bases, cdict)

class Node(object):
   __metaclass__ = MetaNode
History
Date User Action Args
2008-01-04 08:39:42amaury.forgeotdarcsetspambayes_score: 0.0428207 -> 0.042820733
recipients: + amaury.forgeotdarc, lpd
2008-01-04 08:39:42amaury.forgeotdarcsetspambayes_score: 0.0428207 -> 0.0428207
messageid: <[email protected]>
2008-01-04 08:39:42amaury.forgeotdarclinkissue1734 messages
2008-01-04 08:39:41amaury.forgeotdarccreate