]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-40419: timeit CLI docs now mention 1,2,5,10,... trials instead of powers of 10...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Sat, 2 May 2020 16:29:49 +0000 (09:29 -0700)
committerGitHub <noreply@github.com>
Sat, 2 May 2020 16:29:49 +0000 (09:29 -0700)
(cherry picked from commit 766352320fd736e2c8ed545b4cc57563f61a0b9d)

Co-authored-by: Sander <svr003@gmail.com>
Doc/library/timeit.rst
Lib/timeit.py

index ef7a4e40be65908cbf8b47fc532b47b9e24a32cd..46fa62c15fc2ef0001b114ea018f333c6706db06 100644 (file)
@@ -251,7 +251,8 @@ quotes and using leading spaces.  Multiple :option:`-s` options are treated
 similarly.
 
 If :option:`-n` is not given, a suitable number of loops is calculated by trying
-successive powers of 10 until the total time is at least 0.2 seconds.
+increasing numbers from the sequence 1, 2, 5, 10, 20, 50, ... until the total
+time is at least 0.2 seconds.
 
 :func:`default_timer` measurements can be affected by other programs running on
 the same machine, so the best thing to do when accurate timing is necessary is
index c0362bcc5f3e2483e56e428a58448ce74cbec198..6c3ec01067f2d415a87eda572b8727be383d0141 100755 (executable)
@@ -29,7 +29,8 @@ argument in quotes and using leading spaces.  Multiple -s options are
 treated similarly.
 
 If -n is not given, a suitable number of loops is calculated by trying
-successive powers of 10 until the total time is at least 0.2 seconds.
+increasing numbers from the sequence 1, 2, 5, 10, 20, 50, ... until the
+total time is at least 0.2 seconds.
 
 Note: there is a certain baseline overhead associated with executing a
 pass statement.  It differs between versions.  The code here doesn't try