]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-98348: Mention ReferenceError in weakref.proxy documentation (GH-98355)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Wed, 26 Oct 2022 03:55:29 +0000 (20:55 -0700)
committerGitHub <noreply@github.com>
Wed, 26 Oct 2022 03:55:29 +0000 (20:55 -0700)
(cherry picked from commit 216f45e4fec42407ff744b915523a226a0070ff1)

Co-authored-by: fancidev <fancidev@gmail.com>
Doc/library/weakref.rst

index 4b0945c020f843fbe6fc1b2f07828848724e43dd..9a8289a7b533a715320072a46869956030fa10ae 100644 (file)
@@ -144,6 +144,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 ``@=``.