[New-bugs-announce] [issue45927] timeit accepts -c/--clock and -t/--time without any functionality

Marc-Andre Lemburg report at bugs.python.org
Mon Nov 29 09:15:45 EST 2021


New submission from Marc-Andre Lemburg <mal at egenix.com>:

>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).

----------
components: Library (Lib)
messages: 407276
nosy: lemburg
priority: normal
severity: normal
status: open
title: timeit accepts -c/--clock and -t/--time without any functionality
versions: Python 3.10, Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45927>
_______________________________________


More information about the New-bugs-announce mailing list