summaryrefslogtreecommitdiffstats
path: root/Doc/library/weakref.rst
diff options
context:
space:
mode:
authorMariatta <Mariatta@users.noreply.github.com>2017-02-12 16:17:50 (GMT)
committerGitHub <noreply@github.com>2017-02-12 16:17:50 (GMT)
commit3110a379bbb1ec10a84d70a2f0faffcf8d22c7ed (patch)
tree7a6b04633d2e85386498ecd79122b22f44859368 /Doc/library/weakref.rst
parentaf88e7eda4101f36e904771d3cf59a5f740b3b00 (diff)
downloadcpython-3110a379bbb1ec10a84d70a2f0faffcf8d22c7ed.zip
cpython-3110a379bbb1ec10a84d70a2f0faffcf8d22c7ed.tar.gz
cpython-3110a379bbb1ec10a84d70a2f0faffcf8d22c7ed.tar.bz2
bpo-29474: Improve documentation for weakref.WeakValueDictionary (#10)
There were some grammatical errors in weakref.WeakValueDictionary documentation.
Diffstat (limited to 'Doc/library/weakref.rst')
-rw-r--r--Doc/library/weakref.rst10
1 files changed, 5 insertions, 5 deletions
diff --git a/Doc/library/weakref.rst b/Doc/library/weakref.rst
index e289b97..b02a006 100644
--- a/Doc/library/weakref.rst
+++ b/Doc/library/weakref.rst
@@ -166,8 +166,8 @@ Extension types can easily be made to support weak references; see
performed by the program during iteration may cause items in the
dictionary to vanish "by magic" (as a side effect of garbage collection).
-:class:`WeakKeyDictionary` objects have the following additional methods. These
-expose the internal references directly. The references are not guaranteed to
+:class:`WeakKeyDictionary` objects have an additional method that
+exposes the internal references directly. The references are not guaranteed to
be "live" at the time they are used, so the result of calling the references
needs to be checked before being used. This can be used to avoid creating
references that will cause the garbage collector to keep the keys around longer
@@ -192,9 +192,9 @@ than needed.
by the program during iteration may cause items in the dictionary to vanish "by
magic" (as a side effect of garbage collection).
-:class:`WeakValueDictionary` objects have the following additional methods.
-These method have the same issues as the and :meth:`keyrefs` method of
-:class:`WeakKeyDictionary` objects.
+:class:`WeakValueDictionary` objects have an additional method that has the
+same issues as the :meth:`keyrefs` method of :class:`WeakKeyDictionary`
+objects.
.. method:: WeakValueDictionary.valuerefs()