]> granicus.if.org Git - python/commitdiff
bpo-33609: small wording fixes to dict ordering docs (#7497)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Fri, 8 Jun 2018 00:38:22 +0000 (17:38 -0700)
committerYury Selivanov <yury@magic.io>
Fri, 8 Jun 2018 00:38:22 +0000 (20:38 -0400)
A few wording improvements to dict ordering documentation.
(cherry picked from commit d3ed67d14ed401dfe2b5d07b6941adc3ecacb268)

Co-authored-by: Neil Schemenauer <nas-github@arctrix.com>
Doc/library/stdtypes.rst

index 90864d497b52eb1a6ae2b24e18a98faab5cf1538..62373c1810c55cd4314bdc58b70987394b3d0179 100644 (file)
@@ -4229,9 +4229,8 @@ pairs within braces, for example: ``{'jack': 4098, 'sjoerd': 4127}`` or ``{4098:
    value)`` pairs. Order comparisons ('<', '<=', '>=', '>') raise
    :exc:`TypeError`.
 
-   Dict preserves insertion order.  Note that updating key doesn't affects the
-   order.  On the other hand, keys added after deletion are inserted to the
-   last. ::
+   Dictionaries preserve insertion order.  Note that updating a key does not
+   affect the order.  Keys added after deletion are inserted at the end. ::
 
       >>> d = {"one": 1, "two": 2, "three": 3, "four": 4}
       >>> d
@@ -4249,7 +4248,7 @@ pairs within braces, for example: ``{'jack': 4098, 'sjoerd': 4127}`` or ``{4098:
       {'one': 42, 'three': 3, 'four': 4, 'two': None}
 
    .. versionchanged:: 3.7
-      Dict order is guaranteed to be insertion order.  This behavior was
+      Dictionary order is guaranteed to be insertion order.  This behavior was
       implementation detail of CPython from 3.6.
 
 .. seealso::
@@ -4288,7 +4287,7 @@ support membership tests:
    a :exc:`RuntimeError` or fail to iterate over all entries.
 
    .. versionchanged:: 3.7
-      Dict order is guaranteed to be insertion order.
+      Dictionary order is guaranteed to be insertion order.
 
 .. describe:: x in dictview
 
@@ -4702,3 +4701,4 @@ types, where they are relevant.  Some of these are not reported by the
 
 .. [5] To format only a tuple you should therefore provide a singleton tuple whose only
    element is the tuple to be formatted.
+