Issue 33609: Document that dicts preserve insertion order (original) (raw)

Created on 2018-05-22 21:07 by yselivanov, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 7093 merged methane,2018-05-24 09:06
PR 7407 merged miss-islington,2018-06-04 22:09
PR 7485 merged nascheme,2018-06-07 16:14
PR 7497 merged miss-islington,2018-06-07 21:47
Messages (11)
msg317346 - (view) Author: Yury Selivanov (yselivanov) * (Python committer) Date: 2018-05-22 21:07
I don't see it documented that dicts preserve insertion order. 3.7 what's new points to [1], but that section doesn't have a "version changed" tag. IMO, [1] should have two version changed tags: one for 3.6, and one for 3.7. Also, it would be great if we could document how the order is preserved when a key is deleted from the dict etc. [1] https://docs.python.org/3.7/library/stdtypes.html#mapping-types-dict
msg317423 - (view) Author: Cheryl Sabella (cheryl.sabella) * (Python committer) Date: 2018-05-23 16:23
As reference, made some changes documenting that the dicts preserve insertion order. Also, was marked as being superseded by #32337.
msg317454 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2018-05-23 20:41
I agree with Yury's suggestions; the entry in the "Dictionary view objects" section, that Cheryl points to, is not sufficient. Is somebody willing to write a PR?
msg318715 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2018-06-04 22:09
New changeset f822549653d8d09bffff5b7dcddfdf12679a787c by Ned Deily (INADA Naoki) in branch 'master': bpo-33609: Document dict insertion order guarantee as of 3.7 (GH-7093) https://github.com/python/cpython/commit/f822549653d8d09bffff5b7dcddfdf12679a787c
msg318717 - (view) Author: miss-islington (miss-islington) Date: 2018-06-04 22:25
New changeset 8585ec9b761947aae6be5f653a5b9ddef2801d58 by Miss Islington (bot) in branch '3.7': bpo-33609: Document dict insertion order guarantee as of 3.7 (GH-7093) https://github.com/python/cpython/commit/8585ec9b761947aae6be5f653a5b9ddef2801d58
msg318718 - (view) Author: Neil Schemenauer (nascheme) * (Python committer) Date: 2018-06-04 22:27
The wording sounds strange to me. Currently it is: > Note that updating key doesn't affects the order ... I would say: > Note that updating a key does not affect the order ...
msg318719 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2018-06-04 22:30
Neil, that looks like a perfect opportunity to use the GitHub web interface to make that edit :)
msg318973 - (view) Author: Neil Schemenauer (nascheme) * (Python committer) Date: 2018-06-07 21:46
New changeset d3ed67d14ed401dfe2b5d07b6941adc3ecacb268 by Neil Schemenauer in branch 'master': bpo-33609: small wording fixes to dict ordering docs https://github.com/python/cpython/commit/d3ed67d14ed401dfe2b5d07b6941adc3ecacb268
msg319000 - (view) Author: Yury Selivanov (yselivanov) * (Python committer) Date: 2018-06-08 00:38
New changeset 9b0d4d04a15a97a1055f1b729f14e9257f149fd3 by Yury Selivanov (Miss Islington (bot)) in branch '3.7': bpo-33609: small wording fixes to dict ordering docs (#7497) https://github.com/python/cpython/commit/9b0d4d04a15a97a1055f1b729f14e9257f149fd3
msg324951 - (view) Author: Eric Atkin (Eric Atkin) Date: 2018-09-10 19:06
It seems the note at the bottom for `object.__hash__(self)` [1] should be updated as well. [1] https://docs.python.org/3/reference/datamodel.html#object.__hash__
msg358863 - (view) Author: Inada Naoki (methane) * (Python committer) Date: 2019-12-25 13:36
GH-9807 fixed it.
History
Date User Action Args
2022-04-11 14:59:00 admin set github: 77790
2019-12-25 13:36:44 methane set status: open -> closedresolution: fixedmessages: + stage: patch review -> resolved
2018-09-10 19:06:49 Eric Atkin set nosy: + Eric Atkinmessages: +
2018-06-08 00:38:25 yselivanov set messages: +
2018-06-07 21:47:23 miss-islington set pull_requests: + <pull%5Frequest7122>
2018-06-07 21:46:14 nascheme set messages: +
2018-06-07 16:14:52 nascheme set pull_requests: + <pull%5Frequest7110>
2018-06-04 22:30:54 ned.deily set messages: +
2018-06-04 22:27:42 nascheme set nosy: + naschememessages: +
2018-06-04 22:25:14 miss-islington set nosy: + miss-islingtonmessages: +
2018-06-04 22:09:40 miss-islington set pull_requests: + <pull%5Frequest7033>
2018-06-04 22:09:33 ned.deily set messages: +
2018-05-24 09:06:45 methane set keywords: + patchstage: needs patch -> patch reviewpull_requests: + <pull%5Frequest6729>
2018-05-23 20:41:22 ned.deily set priority: normal -> hightype: enhancement -> messages: + stage: needs patch
2018-05-23 16:23:06 cheryl.sabella set nosy: + cheryl.sabellamessages: +
2018-05-22 21:07:30 yselivanov create