[issue34083] Functional Programming HOWTO: Dictionary ordering isn't "essentially random"
New submission from Stig Johan Berggren <stigjb@gmail.com>: The section about iterators in the Functional Programming HOWTO (https://docs.python.org/3/howto/functional.html#data-types-that-support-iter...) states the following about looping over dictionary keys: "Note that the order is essentially random, because it’s based on the hash ordering of the objects in the dictionary." Starting with 3.7, dictionary order is guaranteed to be the same as insertion order. ---------- assignee: docs@python components: Documentation messages: 321375 nosy: Stig Johan Berggren, docs@python priority: normal severity: normal status: open title: Functional Programming HOWTO: Dictionary ordering isn't "essentially random" versions: Python 3.7 _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue34083> _______________________________________
Raymond Hettinger <raymond.hettinger@gmail.com> added the comment: Thanks for noticing this. Do you want to contribute a patch or would you like me to just fix it up? ---------- assignee: docs@python -> rhettinger nosy: +rhettinger _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue34083> _______________________________________
Stig Johan Berggren <stigjb@gmail.com> added the comment: I'll try to patch it myself. ---------- _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue34083> _______________________________________
Change by Stig Johan Berggren <stigjb@gmail.com>: ---------- keywords: +patch pull_requests: +7768 stage: -> patch review _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue34083> _______________________________________
Change by Stig Johan Berggren <stigjb@gmail.com>: ---------- versions: +Python 3.8 _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue34083> _______________________________________
INADA Naoki <songofacandy@gmail.com> added the comment: New changeset 5e5bbbec467a1569c914a048a94e7597528f92cf by INADA Naoki (Stig Johan Berggren) in branch 'master': bpo-34083: Update dict order in Functional HOWTO (GH-8230) https://github.com/python/cpython/commit/5e5bbbec467a1569c914a048a94e7597528... ---------- nosy: +inada.naoki _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue34083> _______________________________________
Change by miss-islington <mariatta.wijaya+miss-islington@gmail.com>: ---------- pull_requests: +7777 _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue34083> _______________________________________
INADA Naoki <songofacandy@gmail.com> added the comment: Thanks, Stig. And I'm sorry about I missed Raymond assigned himself. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue34083> _______________________________________
miss-islington <mariatta.wijaya+miss-islington@gmail.com> added the comment: New changeset 151820e7a0ebe50b3d4fa64e22623c5470f1c56f by Miss Islington (bot) in branch '3.7': bpo-34083: Update dict order in Functional HOWTO (GH-8230) https://github.com/python/cpython/commit/151820e7a0ebe50b3d4fa64e22623c5470f... ---------- nosy: +miss-islington _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue34083> _______________________________________
participants (4)
-
INADA Naoki
-
miss-islington
-
Raymond Hettinger
-
Stig Johan Berggren