summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorNeil Schemenauer <nas-github@arctrix.com>2018-06-07 21:46:04 (GMT)
committerGitHub <noreply@github.com>2018-06-07 21:46:04 (GMT)
commitd3ed67d14ed401dfe2b5d07b6941adc3ecacb268 (patch)
treea723967b6e6ac47906362133e225835e389fdc28 /Doc
parente7adf2ba41832404100313f9ac9d9f7fabedc1fd (diff)
downloadcpython-d3ed67d14ed401dfe2b5d07b6941adc3ecacb268.zip
cpython-d3ed67d14ed401dfe2b5d07b6941adc3ecacb268.tar.gz
cpython-d3ed67d14ed401dfe2b5d07b6941adc3ecacb268.tar.bz2
bpo-33609: small wording fixes to dict ordering docs
A few wording improvements to dict ordering documentation.
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/stdtypes.rst10
1 files changed, 5 insertions, 5 deletions
diff --git a/Doc/library/stdtypes.rst b/Doc/library/stdtypes.rst
index 80dfe88..f24ed62 100644
--- a/Doc/library/stdtypes.rst
+++ b/Doc/library/stdtypes.rst
@@ -4248,9 +4248,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
@@ -4268,7 +4267,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::
@@ -4307,7 +4306,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
@@ -4721,3 +4720,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.
+