[Python-Dev] weakref (or doc) bug?

Gustavo Niemeyer niemeyer@conectiva.com
Tue, 2 Jul 2002 16:54:00 -0300


> >>> help(weakref.ref)
> Help on built-in function ref:
> 
> ref(...)
>     new(object[, callback]) -- create a weak reference to 'object';
>     when 'object' is finalized, 'callback' will be called and passed
>     a reference to 'object'.
>     ^^^^^^^^^^^^^^^^^^^^^^^
[...]
> It appears that it's a reference to the weakref object that's passed, not
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
I'm not sure if that's what was intended, but the documentation seems 
compliant with the current behavior.

-- 
Gustavo Niemeyer

[ 2AAC 7928 0FBF 0299 5EB5  60E2 2253 B29A 6664 3A0C ]