Issue 4810: timeit needs "official" '--' flag (original) (raw)
Issue4810
Created on 2009-01-02 16:41 by skip.montanaro, last changed 2022-04-11 14:56 by admin. This issue is now closed.
Messages (3) | ||
---|---|---|
msg78838 - (view) | Author: Skip Montanaro (skip.montanaro) * ![]() |
Date: 2009-01-02 16:41 |
Consider this timeit run: % python -m timeit '-1.0e-3 < -0.0001 < 1.0e-3' option -1 not recognized use -h/--help for command line help As it turns out this works: % python -m timeit -- '-1.0e-3 < -0.0001 < 1.0e-3' 10000000 loops, best of 3: 0.192 usec per loop but the output using the -h flag doesn't report it as a possibility. It probably should. | ||
msg106512 - (view) | Author: Amaury Forgeot d'Arc (amaury.forgeotdarc) * ![]() |
Date: 2010-05-26 07:47 |
This "--" trick is implemented by the getopt module. OTOH on my system, 'grep' also recognizes this, and I could not find any documentation about it, neither with "grep --help" nor "man grep". | ||
msg112292 - (view) | Author: Georg Brandl (georg.brandl) * ![]() |
Date: 2010-08-01 08:53 |
Usually I would say that this is common UNIX knowledge, except that timeit is also used in Windows environments. Also, the timeit help is already quite thorough, so it can't hurt to mention "--". Done in r83396. |
History | |||
---|---|---|---|
Date | User | Action | Args |
2022-04-11 14:56:43 | admin | set | github: 49060 |
2010-08-01 08:53:15 | georg.brandl | set | status: open -> closednosy: + georg.brandlmessages: + resolution: fixed |
2010-05-26 07:47:34 | amaury.forgeotdarc | set | nosy: + amaury.forgeotdarcmessages: + |
2010-05-20 20:34:29 | skip.montanaro | set | nosy: - skip.montanaro -> (no value) |
2009-01-02 16:41:27 | skip.montanaro | create |