Skip to content

Commit 9299e3a

Browse files
bpo-19737: Improved the documentation for globals (GH-29823) (GH-30042)
Co-authored-by: Alex Waygood <[email protected]> Co-authored-by: Łukasz Langa <[email protected]> (cherry picked from commit 4fe5585) Co-authored-by: 180909 <[email protected]>
1 parent 5f622f1 commit 9299e3a

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

Doc/library/functions.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -686,9 +686,9 @@ are always available. They are listed here in alphabetical order.
686686

687687
.. function:: globals()
688688

689-
Return a dictionary representing the current global symbol table. This is always
690-
the dictionary of the current module (inside a function or method, this is the
691-
module where it is defined, not the module from which it is called).
689+
Return the dictionary implementing the current module namespace. For code within
690+
functions, this is set when the function is defined and remains the same
691+
regardless of where the function is called.
692692

693693

694694
.. function:: hasattr(object, name)
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Update the documentation for the :func:`globals` function.

0 commit comments

Comments
 (0)