Skip to content

Commit 7663523

Browse files
authored
bpo-40419: timeit CLI docs now mention 1,2,5,10,... trials instead of powers of 10 (GH-19752)
1 parent b7226eb commit 7663523

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

Doc/library/timeit.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,8 @@ quotes and using leading spaces. Multiple :option:`-s` options are treated
251251
similarly.
252252

253253
If :option:`-n` is not given, a suitable number of loops is calculated by trying
254-
successive powers of 10 until the total time is at least 0.2 seconds.
254+
increasing numbers from the sequence 1, 2, 5, 10, 20, 50, ... until the total
255+
time is at least 0.2 seconds.
255256

256257
:func:`default_timer` measurements can be affected by other programs running on
257258
the same machine, so the best thing to do when accurate timing is necessary is

Lib/timeit.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@
2929
treated similarly.
3030
3131
If -n is not given, a suitable number of loops is calculated by trying
32-
successive powers of 10 until the total time is at least 0.2 seconds.
32+
increasing numbers from the sequence 1, 2, 5, 10, 20, 50, ... until the
33+
total time is at least 0.2 seconds.
3334
3435
Note: there is a certain baseline overhead associated with executing a
3536
pass statement. It differs between versions. The code here doesn't try

0 commit comments

Comments
 (0)