WeakValueDictionary

Ken Seehof kseehof at neuralintegrator.com
Tue Sep 25 16:09:22 EDT 2001


>>> sys.version
'2.1.1 (#20, Jul 20 2001, 01:19:29) [MSC 32 bit (Intel)]'
>>> import weakref
>>> d = weakref.WeakValueDictionary()
>>> d['z']
Traceback (most recent call last):
  File "<input>", line 1, in ?
  File "C:\PYTHON21\lib\weakref.py", line 35, in __getitem__
    o = self.data.get(key)()
TypeError: object of type 'None' is not callable

Shouldn't this be raising KeyError instead of TypeError?

- Ken

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20010925/ee20ed49/attachment.html>


More information about the Python-list mailing list