This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Command line interface to timeit.py
Type: Stage:
Components: Documentation Versions:
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: georg.brandl, theaney
Priority: normal Keywords:

Created on 2007-03-22 03:06 by theaney, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (2)
msg31613 - (view) Author: Tim Heaney (theaney) Date: 2007-03-22 03:06
In the documentation for timeit.py

  http://docs.python.org/lib/node808.html

it says

  25.9.1 Command Line Interface

  When called as a program from the command line, the following form is used:

  python timeit.py [-n N] [-r N] [-s S] [-t] [-c] [-h] [statement ...]

In fact, for this to work we have to put in the full path to timeit.py. Wouldn't it be better to ask Python to search for it with the -m flag? That is, shouldn't that line be

  python -m timeit [-n N] [-r N] [-s S] [-t] [-c] [-h] [statement ...]

instead?
msg31614 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2007-03-22 08:06
Yes, this is indeed the modern and better thing to do. Fixed in rev. 54524, 54525 (2.5).
History
Date User Action Args
2022-04-11 14:56:23adminsetgithub: 44756
2007-03-22 03:06:30theaneycreate