[Python-bugs-list] [ python-Bugs-458860 ] delitem not supported by Weak*Dicts
noreply@sourceforge.net
noreply@sourceforge.net
Wed, 05 Sep 2001 13:15:32 -0700
Bugs item #458860, was opened at 2001-09-05 13:03
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=458860&group_id=5470
>Category: Python Library
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Tim Hochberg (tim-hochberg)
>Assigned to: Fred L. Drake, Jr. (fdrake)
Summary: delitem not supported by Weak*Dicts
Initial Comment:
Python 2.2a1
Example:
>>> w = weakref.WeakKeyDictionary()
>>> w[c] = 1
>>> del w[c]
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "C:\Python22\lib\UserDict.py", line 16, in
__delitem__
def __delitem__(self, key): del self.data[key]
KeyError: <__main__.C instance at 0081DB54>
>>>
----------------------------------------------------------------------
>Comment By: Guido van Rossum (gvanrossum)
Date: 2001-09-05 13:15
Message:
Logged In: YES
user_id=6380
Yup, still the case in CVS.
Looks like a straightforward bug. Assigned to weakref's
author, Fred Drake. (Fred: you can use any instance as 'c'
in the example.)
----------------------------------------------------------------------
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=458860&group_id=5470