From e219b84152d908999a7f3f36a8b6fa9213fe5f70 Mon Sep 17 00:00:00 2001 From: fancidev Date: Mon, 17 Oct 2022 21:28:05 +0800 Subject: [PATCH] Mention ReferenceError in weakref.proxy doc. --- Doc/library/weakref.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Doc/library/weakref.rst b/Doc/library/weakref.rst index 8397de4fb488f1..a1e542b1e927e4 100644 --- a/Doc/library/weakref.rst +++ b/Doc/library/weakref.rst @@ -146,6 +146,9 @@ See :ref:`__slots__ documentation ` 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 ``@=``.