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: timeit accepts -c/--clock and -t/--time without any functionality
Type: Stage:
Components: Library (Lib) Versions: Python 3.11, Python 3.10
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: lemburg
Priority: normal Keywords:

Created on 2021-11-29 14:15 by lemburg, last changed 2022-04-11 14:59 by admin.

Messages (1)
msg407276 - (view) Author: Marc-Andre Lemburg (lemburg) * (Python committer) Date: 2021-11-29 14:15
From the code:

        opts, args = getopt.getopt(args, "n:u:s:r:tcpvh",
                                   ["number=", "setup=", "repeat=",
                                    "time", "clock", "process",
                                    "verbose", "unit=", "help"])

but the options -c and -t are not used in the subsequent code.

This can lead to situations where if you mistype e.g. -s as -c, you get completely wrong results (see https://bugs.python.org/issue45902 for an example).
History
Date User Action Args
2022-04-11 14:59:52adminsetgithub: 90085
2021-11-29 14:15:45lemburgcreate