Bugs item #1196315, was opened at 2005-05-06 01:59 Message generated for change (Settings changed) made by gbrandl You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1196315&group_id=5470
Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Python Library Group: Python 2.4 Status: Closed Resolution: Fixed Priority: 5 Submitted By: Pavel Pergamenshchik (ppergame) >Assigned to: Georg Brandl (gbrandl) 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: Georg Brandl (birkenfeld) Date: 2005-06-04 09:21 Message: Logged In: YES user_id=1188172 Thanks for the report. Committed as Lib/weakref.py r1.27 r1.26.2.1. ---------------------------------------------------------------------- Comment By: Georg Brandl (birkenfeld) Date: 2005-06-04 07:19 Message: Logged In: YES user_id=1188172 Okay to checkin? ---------------------------------------------------------------------- Comment By: Mike C. Fletcher (mcfletch) Date: 2005-05-11 19:23 Message: Logged In: YES user_id=34901 I would agree that the order is definitely broken. ---------------------------------------------------------------------- Comment By: Raymond Hettinger (rhettinger) Date: 2005-05-10 03: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