[Python-Dev] RE: [Python-checkins] python/dist/src/Lib weakref.py,1.19,1.20

Raymond Hettinger python@rcn.com
Sun, 25 May 2003 02:46:41 -0400


Here's the rest of the last example:

>>> class AltOne(One):
...     def __hash__(self):
...         return 1776
...
>>> del wkd[AltOne()]
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "C:\PY23\lib\weakref.py", line 167, in __delitem__
    del self.data[ref(key)]
KeyError: <weakref at 006BCB70; to 'instance' at 006C22D8>



> [Razor]

Hmm, a new moniker is born ...


[Tim]
> > Note that "calling the reference object" in the docs does not mean the call
> "ref(x)" itself, it means calling the object returned by ref(x) (what I
> named "w" in the quote just above).

Hmm,  I read the docs just a little too quickly.  
Speed reading is not all it's cracked up to be.


Raymond

#################################################################
#################################################################
#################################################################
#####
#####
#####
#################################################################
#################################################################
#################################################################