diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2019-06-15 04:50:11 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-15 04:50:11 -0700 |
commit | 30cac20101717e7cbb13db470787f8437bd98b04 (patch) | |
tree | f98ebe069b19438e5c9069c07dae52d0891555d0 | |
parent | 5e97450d83d4f4240315f46419686ec193273e13 (diff) | |
download | cpython-git-30cac20101717e7cbb13db470787f8437bd98b04.tar.gz |
Update weakref.rst (GH-14098)
(cherry picked from commit f475729a714a9fb13672f8989c4abbafb783e09b)
Co-authored-by: Géry Ogam <gery.ogam@gmail.com>
-rw-r--r-- | Doc/library/weakref.rst | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/Doc/library/weakref.rst b/Doc/library/weakref.rst index 7f3d267d74..8d8a0b5df2 100644 --- a/Doc/library/weakref.rst +++ b/Doc/library/weakref.rst @@ -65,8 +65,8 @@ exposed by the :mod:`weakref` module for the benefit of advanced uses. Not all objects can be weakly referenced; those objects which can include class instances, functions written in Python (but not in C), instance methods, sets, -frozensets, some :term:`file objects <file object>`, :term:`generator`\s, type -objects, sockets, arrays, deques, regular expression pattern objects, and code +frozensets, some :term:`file objects <file object>`, :term:`generators <generator>`, +type objects, sockets, arrays, deques, regular expression pattern objects, and code objects. .. versionchanged:: 3.2 @@ -80,9 +80,10 @@ support weak references but can add support through subclassing:: obj = Dict(red=1, green=2, blue=3) # this object is weak referenceable -Other built-in types such as :class:`tuple` and :class:`int` do not support weak -references even when subclassed (This is an implementation detail and may be -different across various Python implementations.). +.. impl-detail:: + + Other built-in types such as :class:`tuple` and :class:`int` do not support weak + references even when subclassed. Extension types can easily be made to support weak references; see :ref:`weakref-support`. |