[Python-checkins] gh-98348: Mention ReferenceError in weakref.proxy documentation (GH-98355)

miss-islington webhook-mailer at python.org
Tue Oct 25 23:55:36 EDT 2022


https://github.com/python/cpython/commit/2aedba59ecc7e89479226f0013c1771c4ef66413
commit: 2aedba59ecc7e89479226f0013c1771c4ef66413
branch: 3.11
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: miss-islington <31488909+miss-islington at users.noreply.github.com>
date: 2022-10-25T20:55:29-07:00
summary:

gh-98348: Mention ReferenceError in weakref.proxy documentation (GH-98355)

(cherry picked from commit 216f45e4fec42407ff744b915523a226a0070ff1)

Co-authored-by: fancidev <fancidev at gmail.com>

files:
M Doc/library/weakref.rst

diff --git a/Doc/library/weakref.rst b/Doc/library/weakref.rst
index 8397de4fb488..a1e542b1e927 100644
--- a/Doc/library/weakref.rst
+++ b/Doc/library/weakref.rst
@@ -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 ``@=``.



More information about the Python-checkins mailing list