From 55debd06a063f017c75b169ace4c24eaff462a63 Mon Sep 17 00:00:00 2001 From: Srinivas Reddy Thatiparthy Date: Sun, 24 Dec 2017 22:56:58 +0530 Subject: [PATCH 1/4] Add documentation that at the module level, locals(), globals() are the same dictionary --- Doc/library/functions.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Doc/library/functions.rst b/Doc/library/functions.rst index e47225718c1b51..5cae644704d971 100644 --- a/Doc/library/functions.rst +++ b/Doc/library/functions.rst @@ -820,7 +820,8 @@ are always available. They are listed here in alphabetical order. Update and return a dictionary representing the current local symbol table. Free variables are returned by :func:`locals` when it is called in function - blocks, but not in class blocks. + blocks, but not in class blocks. Remember that at the module level, :func:`locals` + and :func:`globals` are the same dictionary. .. note:: The contents of this dictionary should not be modified; changes may not From 87604662a30d5d70619bea2cab5c9374feddd151 Mon Sep 17 00:00:00 2001 From: Srinivas Reddy Thatiparthy Date: Sun, 24 Dec 2017 22:59:53 +0530 Subject: [PATCH 2/4] Add News entry --- .../next/Documentation/2017-12-24-22-29-37.bpo-32413.eZe-ID.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 Misc/NEWS.d/next/Documentation/2017-12-24-22-29-37.bpo-32413.eZe-ID.rst diff --git a/Misc/NEWS.d/next/Documentation/2017-12-24-22-29-37.bpo-32413.eZe-ID.rst b/Misc/NEWS.d/next/Documentation/2017-12-24-22-29-37.bpo-32413.eZe-ID.rst new file mode 100644 index 00000000000000..3d2994c2d88241 --- /dev/null +++ b/Misc/NEWS.d/next/Documentation/2017-12-24-22-29-37.bpo-32413.eZe-ID.rst @@ -0,0 +1 @@ +Add documentation that at module level, locals() and globals() are the same dictionary From eb55a9f12402b712306277dcbdf15d493eec9467 Mon Sep 17 00:00:00 2001 From: Brett Cannon Date: Mon, 1 Apr 2019 14:53:01 -0700 Subject: [PATCH 3/4] Tweak wording --- Doc/library/functions.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/library/functions.rst b/Doc/library/functions.rst index 5cae644704d971..e24149fe9d81d2 100644 --- a/Doc/library/functions.rst +++ b/Doc/library/functions.rst @@ -820,7 +820,7 @@ are always available. They are listed here in alphabetical order. Update and return a dictionary representing the current local symbol table. Free variables are returned by :func:`locals` when it is called in function - blocks, but not in class blocks. Remember that at the module level, :func:`locals` + blocks, but not in class blocks. Note that at the module level, :func:`locals` and :func:`globals` are the same dictionary. .. note:: From e674dc0f6c47b7c9de5aded6e5b8e0569712e83a Mon Sep 17 00:00:00 2001 From: Brett Cannon Date: Mon, 1 Apr 2019 14:53:40 -0700 Subject: [PATCH 4/4] News entry isn't necessary --- .../next/Documentation/2017-12-24-22-29-37.bpo-32413.eZe-ID.rst | 1 - 1 file changed, 1 deletion(-) delete mode 100644 Misc/NEWS.d/next/Documentation/2017-12-24-22-29-37.bpo-32413.eZe-ID.rst diff --git a/Misc/NEWS.d/next/Documentation/2017-12-24-22-29-37.bpo-32413.eZe-ID.rst b/Misc/NEWS.d/next/Documentation/2017-12-24-22-29-37.bpo-32413.eZe-ID.rst deleted file mode 100644 index 3d2994c2d88241..00000000000000 --- a/Misc/NEWS.d/next/Documentation/2017-12-24-22-29-37.bpo-32413.eZe-ID.rst +++ /dev/null @@ -1 +0,0 @@ -Add documentation that at module level, locals() and globals() are the same dictionary