Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
d3ed67d1
Commit
d3ed67d1
authored
Jun 07, 2018
by
Neil Schemenauer
Committed by
GitHub
Jun 07, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bpo-33609: small wording fixes to dict ordering docs
A few wording improvements to dict ordering documentation.
parent
e7adf2ba
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
Doc/library/stdtypes.rst
Doc/library/stdtypes.rst
+5
-5
No files found.
Doc/library/stdtypes.rst
View file @
d3ed67d1
...
...
@@ -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
Dict
ionary
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.
Dict
ionary
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.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment