Amaury Forgeot d'Arc added the comment:
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
----------
nosy: +amaury.forgeotdarc
resolution: -> invalid
status: open -> closed
__________________________________
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue1734>
__________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com