[Python-Dev] Standard Library Tour Part II
Armin Rigo
arigo at tunes.org
Mon May 24 20:14:25 EDT 2004
Hello Raymond,
On Mon, May 24, 2004 at 07:13:44PM -0400, Raymond Hettinger wrote:
> >>> del a # remove the one reference
> >>> gc.collect() # make garbage collection run right away
> 0
> >>> d['primary'] = a # the entry was automatically removed
>
> Traceback (most recent call last):
> File "<pyshell#108>", line 1, in -toplevel-
> d['primary'] = a # does not create a reference
> NameError: name 'a' is not defined
Oups, wrong line and hence wrong exception for what you're trying to show.
A bientot,
Armin
More information about the Python-Dev
mailing list