Fix instances in documentation where dictionaries are referenced as unordered #77399
Copy link
Copy link
Closed
Labels
3.7 (EOL)end of lifeend of life3.8 (EOL)end of lifeend of lifedocsDocumentation in the Doc dirDocumentation in the Doc dir
Description
| BPO | 33218 |
|---|---|
| Nosy | @rhettinger, @arjunv |
| Superseder |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee = None
closed_at = <Date 2018-04-04.04:24:58.573>
created_at = <Date 2018-04-03.20:26:04.510>
labels = ['3.7', '3.8', 'docs']
title = 'Fix instances in documentation where dictionaries are referenced as unordered'
updated_at = <Date 2018-04-04.04:24:58.572>
user = 'https://github.com/arjunv'bugs.python.org fields:
activity = <Date 2018-04-04.04:24:58.572>
actor = 'methane'
assignee = 'docs@python'
closed = True
closed_date = <Date 2018-04-04.04:24:58.573>
closer = 'methane'
components = ['Documentation']
creation = <Date 2018-04-03.20:26:04.510>
creator = 'arjunv'
dependencies = []
files = []
hgrepos = []
issue_num = 33218
keywords = []
message_count = 3.0
messages = ['314892', '314914', '314915']
nosy_count = 3.0
nosy_names = ['rhettinger', 'docs@python', 'arjunv']
pr_nums = []
priority = 'normal'
resolution = 'duplicate'
stage = 'resolved'
status = 'closed'
superseder = '32337'
type = None
url = 'https://bugs.python.org/issue33218'
versions = ['Python 3.7', 'Python 3.8']Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
3.7 (EOL)end of lifeend of life3.8 (EOL)end of lifeend of lifedocsDocumentation in the Doc dirDocumentation in the Doc dir
Activity
arjunv commentedon Apr 3, 2018
In python 3.6 (and above hopefully), dictionary keys are going to be ordered, while their documentation still reference them as being unordered.
https://docs.python.org/3/tutorial/datastructures.html#dictionaries
1:
It is best to think of a dictionary as an unordered set of key: value pairs,...2:
Performing list(d.keys()) on a dictionary returns a list of all the keys used in the dictionary, in arbitrary order..The examples should also be changed to reflect the same:
rhettinger commentedon Apr 4, 2018
Would you like to make a pull request or do you prefer for me to assign it to someone else?
rhettinger commentedon Apr 4, 2018
Also check the 3.7 docs to see if this work has already been done.
It's unlikely that the 3.6 docs will change because it is considered a non-guaranteed implementation detail for 3.6.