]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-98348: Mention ReferenceError in weakref.proxy documentation (#98355)
authorfancidev <fancidev@gmail.com>
Wed, 26 Oct 2022 03:48:24 +0000 (11:48 +0800)
committerGitHub <noreply@github.com>
Wed, 26 Oct 2022 03:48:24 +0000 (20:48 -0700)
Doc/library/weakref.rst

index 8397de4fb488f1d6906d10683428660d810f0645..a1e542b1e927e493b962adf4ba4f1380ef660a56 100644 (file)
@@ -146,6 +146,9 @@ See :ref:`__slots__ documentation <slots>` for details.
    prevent their use as dictionary keys.  *callback* is the same as the parameter
    of the same name to the :func:`ref` function.
 
+   Accessing an attribute of the proxy object after the referent is
+   garbage collected raises :exc:`ReferenceError`.
+
    .. versionchanged:: 3.8
       Extended the operator support on proxy objects to include the matrix
       multiplication operators ``@`` and ``@=``.