Message2020

Author tristanlk
Recipients
Date 2007-11-27.23:20:48
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
when a non-dict is passed as input to a dict __setitem__ is called to set the values. this is fine for dict objects, but can break things inheriting from dict (i.e. see attachment). __setitem__ shouldn't be called until __init__ is complete.

i'm working out of the trunk.

here's the outputs i get from the attached test case:

$ python dict_inheritance_bug.py 
{'a': 1}

$ jython dict_inheritance_bug.py
Traceback (innermost last):
  File "dict_inheritance_bug.py", line 9, in ?
  File "dict_inheritance_bug.py", line 3, in __init__
  File "dict_inheritance_bug.py", line 7, in __setitem__
AttributeError: '__main__.Test' object has no attribute 'doStuff'
History
Date User Action Args
2008-02-20 17:18:07adminlinkissue1839871 messages
2008-02-20 17:18:07admincreate