Bugs item #1196315, was opened at 2005-05-05 20:59 Message generated for change (Comment added) made by rhettinger You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1196315&group_id=5470
Category: Python Library Group: Python 2.4 Status: Open Resolution: None Priority: 5 Submitted By: Pavel Pergamenshchik (ppergame) >Assigned to: Fred L. Drake, Jr. (fdrake) Summary: WeakValueDictionary.__init__ is backwards Initial Comment: >>> from weakref import WeakValueDictionary as wvd >>> class A: ... pass ... >>> wvd({1:A()}) Traceback (most recent call last): File "<stdin>", line 1, in ? File "/usr/lib/python2.4/weakref.py", line 46, in __init__ UserDict.UserDict.__init__(self, *args, **kw) File "/usr/lib/python2.4/UserDict.py", line 7, in __init__ self.update(dict) File "/usr/lib/python2.4/weakref.py", line 161, in update d[key] = KeyedRef(o, self._remove, key) AttributeError: WeakValueDictionary instance has no attribute '_remove' WeakValueDictionary.__init__ calls UserDict.__init__ first and sets self._remove second. It should do it the other way around. This is a regression from 2.3. ---------------------------------------------------------------------- >Comment By: Raymond Hettinger (rhettinger) Date: 2005-05-09 22:36 Message: Logged In: YES user_id=80475 Fred, I believe this was your change (1.23). The OP's request apprears correct to me. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1196315&group_id=5470 _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com