[Python-checkins] bpo-32413: Add documentation that at the module level, locals(), globals() are the same dictionary (GH-5004)

Miss Islington (bot) webhook-mailer at python.org
Tue Apr 2 14:14:57 EDT 2019


https://github.com/python/cpython/commit/ef516d11c1a0f885dba0aba8cf5366502077cdd4
commit: ef516d11c1a0f885dba0aba8cf5366502077cdd4
branch: 3.7
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: GitHub <noreply at github.com>
date: 2019-04-02T11:14:50-07:00
summary:

bpo-32413: Add documentation that at the module level, locals(), globals() are the  same dictionary (GH-5004)


https://bugs.python.org/issue32413
(cherry picked from commit 1c5fa5af8a95f25119e45e40a4ed8183d06f4a5b)

Co-authored-by: Srinivas Reddy Thatiparthy (శ్రీనివాస్  రెడ్డి తాటిపర్తి) <thatiparthysreenivas at gmail.com>

files:
M Doc/library/functions.rst

diff --git a/Doc/library/functions.rst b/Doc/library/functions.rst
index 2ed6fb3ba2b0..11147525d7e8 100644
--- a/Doc/library/functions.rst
+++ b/Doc/library/functions.rst
@@ -842,7 +842,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. Note 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



More information about the Python-checkins mailing list