bpo-29474: Improve documentation for weakref.WeakValueDictionary (#10)

There were some grammatical errors in weakref.WeakValueDictionary
documentation.
This commit is contained in:
Mariatta 2017-02-12 08:17:50 -08:00 committed by GitHub
parent af88e7eda4
commit 3110a379bb
1 changed files with 5 additions and 5 deletions

View 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 performed by the program during iteration may cause items in the
dictionary to vanish "by magic" (as a side effect of garbage collection). dictionary to vanish "by magic" (as a side effect of garbage collection).
:class:`WeakKeyDictionary` objects have the following additional methods. These :class:`WeakKeyDictionary` objects have an additional method that
expose the internal references directly. The references are not guaranteed to 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 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 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 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 by the program during iteration may cause items in the dictionary to vanish "by
magic" (as a side effect of garbage collection). magic" (as a side effect of garbage collection).
:class:`WeakValueDictionary` objects have the following additional methods. :class:`WeakValueDictionary` objects have an additional method that has the
These method have the same issues as the and :meth:`keyrefs` method of same issues as the :meth:`keyrefs` method of :class:`WeakKeyDictionary`
:class:`WeakKeyDictionary` objects. objects.
.. method:: WeakValueDictionary.valuerefs() .. method:: WeakValueDictionary.valuerefs()