cpython: c39457a07caa (original) (raw)

Mercurial > cpython

changeset 91990:c39457a07caa 3.4

#18588: update the timeit examples to be consistent. [#18588]

Ezio Melotti ezio.melotti@gmail.com
date Mon, 04 Aug 2014 17:01:16 +0300
parents a42f14ff0f9a
children 45b208ae9eab 9ec2b429a607
files Doc/library/timeit.rst
diffstat 1 files changed, 10 insertions(+), 9 deletions(-)[+] [-] Doc/library/timeit.rst 19

line wrap: on

line diff

--- a/Doc/library/timeit.rst +++ b/Doc/library/timeit.rst @@ -28,22 +28,23 @@ can be used to compare three different e .. code-block:: sh

This can be achieved from the :ref:python-interface with:: >>> import timeit >>> timeit.timeit('"-".join(str(n) for n in range(100))', number=10000)

Note however that :mod:timeit will automatically determine the number of repetitions only when the command-line interface is used. In the