bpo-19737: Improved the documentation for globals (GH-29823) · python/cpython@4fe5585 (original) (raw)

File tree

2 files changed

lines changed

2 files changed

lines changed

Original file line number Diff line number Diff line change
@@ -733,9 +733,9 @@ are always available. They are listed here in alphabetical order.
733 733
734 734 .. function:: globals()
735 735
736 - Return a dictionary representing the current global symbol table. This is always
737 -the dictionary of the current module (inside a function or method, this is the
738 -module where it is defined, not the module from which it is called).
736 + Return the dictionary implementing the current module namespace. For code within
737 +functions, this is set when the function is defined and remains the same
738 +regardless of where the function is called.
739 739
740 740
741 741 .. function:: hasattr(object, name)
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1 +Update the documentation for the :func:`globals` function.