This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author arjunv
Recipients arjunv, docs@python
Date 2018-04-03.20:26:04
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1522787164.53.0.467229070634.issue33218@psf.upfronthosting.co.za>
In-reply-to
Content
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:
```
>>> tel = {'jack': 4098, 'sape': 4139}
>>> tel['guido'] = 4127
>>> tel
{'sape': 4139, 'guido': 4127, 'jack': 4098}
>>> tel['jack']
4098
>>> del tel['sape']
>>> tel['irv'] = 4127
>>> tel
{'guido': 4127, 'irv': 4127, 'jack': 4098}
>>> list(tel.keys())
['irv', 'guido', 'jack']
>>> sorted(tel.keys())
['guido', 'irv', 'jack']
>>> 'guido' in tel
True
>>> 'jack' not in tel
False
```

```
>>> dict([('sape', 4139), ('guido', 4127), ('jack', 4098)])
{'sape': 4139, 'guido': 4127, 'jack': 4098}
```

```
>>> dict(sape=4139, guido=4127, jack=4098)
{'sape': 4139, 'guido': 4127, 'jack': 4098}
```
History
Date User Action Args
2018-04-03 20:26:04arjunvsetrecipients: + arjunv, docs@python
2018-04-03 20:26:04arjunvsetmessageid: <1522787164.53.0.467229070634.issue33218@psf.upfronthosting.co.za>
2018-04-03 20:26:04arjunvlinkissue33218 messages
2018-04-03 20:26:04arjunvcreate