Message1534

Author h_eriksson
Recipients
Date 2007-03-08.07:09:32
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
The dct object that gets passed to a metaclass' __init__ method seems to point to the actual __dict__ of the class beeing created. I guess it should be a copy?

The following code breaks with a KeyError since delattr removes the attribute from dct.

def __init__(cls, name, bases, dct):
  # ...snip
  dctnames = dct.keys()
  if name.endswith("__doc"):
    if hasattr(cls, name):
      delattr(cls, name)
                
  val = dct[name]
  # ...snip
History
Date User Action Args
2008-02-20 17:17:46adminlinkissue1676293 messages
2008-02-20 17:17:46admincreate