From: Fred Drake Date: Tue, 3 Feb 2004 20:50:45 +0000 (+0000) Subject: Clarify minor point about the ref() and proxy() constructors. X-Git-Tag: v2.3.4c1~145 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=bf96e061a8ae7f755638499b87ff72c4943cdbd8;p=thirdparty%2FPython%2Fcpython.git Clarify minor point about the ref() and proxy() constructors. This matches what is already documented for corresponding feature of the C API. --- diff --git a/Doc/lib/libweakref.tex b/Doc/lib/libweakref.tex index 297d9b65e75b..6e022ae44f69 100644 --- a/Doc/lib/libweakref.tex +++ b/Doc/lib/libweakref.tex @@ -57,8 +57,9 @@ be made to support weak references; see section \ref{weakref-extension}, Return a weak reference to \var{object}. The original object can be retrieved by calling the reference object if the referent is still alive; if the referent is no longer alive, calling the reference - object will cause \code{None} to be returned. If \var{callback} is - provided, it will be called when the object is about to be + object will cause \constant{None} to be returned. If \var{callback} is + provided and not \constant{None}, + it will be called when the object is about to be finalized; the weak reference object will be passed as the only parameter to the callback; the referent will no longer be available. @@ -190,7 +191,7 @@ True \end{verbatim} If the referent no longer exists, calling the reference object returns -\code{None}: +\constant{None}: \begin{verbatim} >>> del o, o2