From e283803b165f4c176348f97ec26603b19a2853c4 Mon Sep 17 00:00:00 2001 From: furkanonder Date: Mon, 16 Mar 2020 11:57:01 +0300 Subject: [PATCH 1/4] update language reference to specify that dict is insertion-ordered. --- Doc/reference/datamodel.rst | 5 +++++ Misc/ACKS | 1 + 2 files changed, 6 insertions(+) diff --git a/Doc/reference/datamodel.rst b/Doc/reference/datamodel.rst index c683d9991eb5abe..6adb5e429c1d81a 100644 --- a/Doc/reference/datamodel.rst +++ b/Doc/reference/datamodel.rst @@ -436,6 +436,11 @@ Mappings additional examples of mapping types, as does the :mod:`collections` module. + .. versionchanged:: 3.7 + Dictionary order is guaranteed to be insertion order. Note that updating a key + does not affect the order. Keys added after deletion are inserted at the end. + This behavior was an implementation detail of CPython from 3.6. + Callable types .. index:: object: callable diff --git a/Misc/ACKS b/Misc/ACKS index 37cf7af0c2ec517..fd212d0fa9f9355 100644 --- a/Misc/ACKS +++ b/Misc/ACKS @@ -1235,6 +1235,7 @@ Jeffrey Ollie Adam Olsen Bryan Olson Grant Olson +Furkan Onder Koray Oner Piet van Oostrum Tomas Oppelstrup From d1c0840c3603dd60a912bcc6063e0dc87df7f081 Mon Sep 17 00:00:00 2001 From: "blurb-it[bot]" <43283697+blurb-it[bot]@users.noreply.github.com> Date: Mon, 16 Mar 2020 09:15:24 +0000 Subject: [PATCH 2/4] =?UTF-8?q?=F0=9F=93=9C=F0=9F=A4=96=20Added=20by=20blu?= =?UTF-8?q?rb=5Fit.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../next/Documentation/2020-03-16-09-15-24.bpo-39879.jGDQ7N.rst | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 Misc/NEWS.d/next/Documentation/2020-03-16-09-15-24.bpo-39879.jGDQ7N.rst diff --git a/Misc/NEWS.d/next/Documentation/2020-03-16-09-15-24.bpo-39879.jGDQ7N.rst b/Misc/NEWS.d/next/Documentation/2020-03-16-09-15-24.bpo-39879.jGDQ7N.rst new file mode 100644 index 000000000000000..65fe4b3314c56f6 --- /dev/null +++ b/Misc/NEWS.d/next/Documentation/2020-03-16-09-15-24.bpo-39879.jGDQ7N.rst @@ -0,0 +1,2 @@ +Update language reference to specify that dict is insertion-ordered. +Patch by Furkan Önder. \ No newline at end of file From e48cc0032b73591b067cc2893d0a9ab776f82ee8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Furkan=20=C3=96nder?= Date: Mon, 16 Mar 2020 12:52:15 +0300 Subject: [PATCH 3/4] Update Doc/reference/datamodel.rst MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Batuhan Taşkaya <47358913+isidentical@users.noreply.github.com> --- Doc/reference/datamodel.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/reference/datamodel.rst b/Doc/reference/datamodel.rst index 6adb5e429c1d81a..27076219978cca6 100644 --- a/Doc/reference/datamodel.rst +++ b/Doc/reference/datamodel.rst @@ -437,7 +437,7 @@ Mappings module. .. versionchanged:: 3.7 - Dictionary order is guaranteed to be insertion order. Note that updating a key + The dictionary order is guaranteed to be the same as the insertion order. Note that updating a key does not affect the order. Keys added after deletion are inserted at the end. This behavior was an implementation detail of CPython from 3.6. From f232aed43d6924f71a874cee07a3b5dbef82e4fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Furkan=20=C3=96nder?= Date: Wed, 18 Mar 2020 02:14:01 +0300 Subject: [PATCH 4/4] wrap lines --- Doc/reference/datamodel.rst | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Doc/reference/datamodel.rst b/Doc/reference/datamodel.rst index 27076219978cca6..00ef7ff126ba08a 100644 --- a/Doc/reference/datamodel.rst +++ b/Doc/reference/datamodel.rst @@ -437,9 +437,10 @@ Mappings module. .. versionchanged:: 3.7 - The dictionary order is guaranteed to be the same as the insertion order. Note that updating a key - does not affect the order. Keys added after deletion are inserted at the end. - This behavior was an implementation detail of CPython from 3.6. + The dictionary order is guaranteed to be the same as the insertion order. + Note that updating a key does not affect the order. Keys added after + deletion are inserted at the end. This behavior was an implementation + detail of CPython from 3.6. Callable types .. index::