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.0428207
Marked as misclassified No
Message-id <1199435982.35.0.329810993025.issue1734@psf.upfronthosting.co.za>
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.0428207
recipients: + amaury.forgeotdarc, lpd
2008-01-04 08:39:42amaury.forgeotdarcsetspambayes_score: 0.0428207 -> 0.0428207
messageid: <1199435982.35.0.329810993025.issue1734@psf.upfronthosting.co.za>
2008-01-04 08:39:42amaury.forgeotdarclinkissue1734 messages
2008-01-04 08:39:41amaury.forgeotdarccreate