stmt and setup can contain multiple statements, see #5896

This commit is contained in:
Ezio Melotti 2009-06-27 23:45:39 +00:00
parent 00a58c3574
commit 1dfd5d9f78
1 changed files with 3 additions and 2 deletions

View File

@ -26,8 +26,9 @@ The module defines the following public class:
The constructor takes a statement to be timed, an additional statement used for The constructor takes a statement to be timed, an additional statement used for
setup, and a timer function. Both statements default to ``'pass'``; the timer setup, and a timer function. Both statements default to ``'pass'``; the timer
function is platform-dependent (see the module doc string). The statements may function is platform-dependent (see the module doc string). *stmt* and *setup*
contain newlines, as long as they don't contain multi-line string literals. may also contain multiple statements separated by ``;`` or newlines, as long as
they dont contain multi-line string literals.
To measure the execution time of the first statement, use the :meth:`timeit` To measure the execution time of the first statement, use the :meth:`timeit`
method. The :meth:`repeat` method is a convenience to call :meth:`timeit` method. The :meth:`repeat` method is a convenience to call :meth:`timeit`