]> granicus.if.org Git - python/commitdiff
bpo-29474: Improve documentation for weakref.WeakValueDictionary (#23)
authorMariatta <Mariatta@users.noreply.github.com>
Sun, 12 Feb 2017 16:21:36 +0000 (08:21 -0800)
committerGitHub <noreply@github.com>
Sun, 12 Feb 2017 16:21:36 +0000 (08:21 -0800)
There were some grammatical errors in weakref.WeakValueDictionary
documentation.

Doc/library/weakref.rst

index e289b971e7c269ff0092b943aa5671184b2148a1..b02a006d733b6e226aad76cd623875aaa98f79df 100644 (file)
@@ -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()