8000 Update weakref.rst (GH-14098) · python/cpython@f475729 · GitHub
[go: up one dir, main page]

Skip to content

Commit f475729

Browse files
geryogammiss-islington
authored andcommitted
Update weakref.rst (GH-14098)
1 parent 0237265 commit f475729

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

Doc/library/weakref.rst

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,8 @@ exposed by the :mod:`weakref` module for the benefit of advanced uses.
6565

6666
Not all objects can be weakly referenced; those objects which can include class
6767
instances, functions written in Python (but not in C), instance methods, sets,
68-
frozensets, some :term:`file objects <file object>`, :term:`generator`\s, type
69-
objects, sockets, arrays, deques, regular expression pattern objects, and code
68+
frozensets, some :term:`file objects <file object>`, :term:`generators <generator>`,
69+
type objects, sockets, arrays, deques, regular expression pattern objects, and code
7070
objects.
7171

7272
.. versionchanged:: 3.2
@@ -80,9 +80,10 @@ support weak references but can add support through subclassing::
8080

8181
obj = Dict(red=1, green=2, blue=3) # this object is weak referenceable
8282

83-
Other built-in types such as :class:`tuple` and :class:`int` do not support weak
84-
references even when subclassed (This is an implementation detail and may be
85-
different across various Python implementations.).
83+
.. impl-detail::
84+
85+
Other built-in types such as :class:`tuple` and :class:`int` do not support weak
86+
references even when subclassed.
8687

8788
Extension types can easily be made to support weak references; see
8889
:ref:`weakref-support`.

0 commit comments

Comments
 (0)
0