Skip to content

Commit 0ac43c4

Browse files
committed
update docs
1 parent 4fb9492 commit 0ac43c4

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

Doc/library/timeit.rst

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,8 @@ The module defines three convenience functions and a public class:
7171
*global_setup* global code and *timer* function and run its :meth:`.timeit`
7272
method with the given *number* executions.
7373
The optional *globals* argument specifies a namespace in which to execute the
74-
code.
74+
code. Names created in the global setup are seen as globals in the setup and
75+
testing code.
7576

7677
.. versionchanged:: 3.5
7778
The optional *globals* parameter was added.
@@ -89,7 +90,8 @@ The module defines three convenience functions and a public class:
8990
*global_setup* global code and *timer* function and run its :meth:`.repeat`
9091
method with the given *repeat* count and *number* executions.
9192
The optional *globals* argument specifies a namespace in which to execute the
92-
code.
93+
code. Names created in the global setup are seen as globals in the setup and
94+
testing code.
9395

9496
.. versionchanged:: 3.5
9597
The optional *globals* parameter was added.
@@ -125,7 +127,9 @@ The module defines three convenience functions and a public class:
125127
string literals.
126128

127129
The statement will by default be executed within timeit's namespace; this behavior
128-
can be controlled by passing a namespace to *globals*.
130+
can be controlled by passing a namespace to *globals*. Names created in the
131+
global setup are seen as globals in the setup and testing code, and may
132+
overwrite those already specified in *globals*.
129133

130134
The distinction between *setup* and *global_setup* is that *setup* is
131135
executed once per :meth:`.timeit` call while *global_setup* is executed

0 commit comments

Comments
 (0)