]> granicus.if.org Git - python/commitdiff
Update weakref.rst (GH-14098)
authorGéry Ogam <gery.ogam@gmail.com>
Sat, 15 Jun 2019 11:33:23 +0000 (13:33 +0200)
committerMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Sat, 15 Jun 2019 11:33:23 +0000 (04:33 -0700)
Doc/library/weakref.rst

index a5c4295ef1faf98a27d0991d364dd0bf24b55db8..c3519e45beb6b1f60a607e2dfa7c1c5892d62953 100644 (file)
@@ -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`.