Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 1c5fa5a

Browse files
srinivasreddymiss-islington
authored andcommitted
bpo-32413: Add documentation that at the module level, locals(), globals() are the same dictionary (GH-5004)
https://bugs.python.org/issue32413
1 parent fcef60f commit 1c5fa5a

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

Doc/library/functions.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -843,7 +843,8 @@ are always available. They are listed here in alphabetical order.
843843

844844
Update and return a dictionary representing the current local symbol table.
845845
Free variables are returned by :func:`locals` when it is called in function
846-
blocks, but not in class blocks.
846+
blocks, but not in class blocks. Note that at the module level, :func:`locals`
847+
and :func:`globals` are the same dictionary.
847848

848849
.. note::
849850
The contents of this dictionary should not be modified; changes may not

0 commit comments

Comments
 (0)