From: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Date: Sat, 15 Jun 2019 11:49:43 +0000 (-0700) Subject: Update weakref.rst (GH-14098) X-Git-Tag: v3.8.0b2~128 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=68878140694faa8dc53daeb5d9fee4d60ed2b672;p=python Update weakref.rst (GH-14098) (cherry picked from commit f475729a714a9fb13672f8989c4abbafb783e09b) Co-authored-by: Géry Ogam --- diff --git a/Doc/library/weakref.rst b/Doc/library/weakref.rst index a28d71060f..b3c8e35455 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 `, :term:`generator`\s, type -objects, sockets, arrays, deques, regular expression pattern objects, and code +frozensets, some :term:`file objects `, :term:`generators `, +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`.