[Python-Dev] weakref (or doc) bug?
David Abrahams
David Abrahams" <david.abrahams@rcn.com
Tue, 2 Jul 2002 16:01:15 -0400
From: "Gustavo Niemeyer" <niemeyer@conectiva.com>
> > >>> 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.
Only if you take the unqualified term "reference" to mean a weakref.ref
object. I read it as being a regular reference. You might think I have
Java-on-the-brain, but I've never programmed a line of that foul black
sludge in my life. I'm sure other people will read it the way I do.
-Dave