From 712515e4efcbbd66b1d7cc77496df81e3bef6ef5 Mon Sep 17 00:00:00 2001 From: Xiang Zhang Date: Mon, 27 Feb 2017 12:54:58 +0800 Subject: [PATCH 1/2] fix contradiction in timeit.Timer.autorange's docstring --- Lib/timeit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) mode change 100644 => 100755 Lib/timeit.py diff --git a/Lib/timeit.py b/Lib/timeit.py old mode 100644 new mode 100755 index 38c2b1f061e695..419bdde3c2b9b1 --- a/Lib/timeit.py +++ b/Lib/timeit.py @@ -206,7 +206,7 @@ def repeat(self, repeat=default_repeat, number=default_number): return r def autorange(self, callback=None): - """Return the number of loops so that total time >= 0.2. + """Calculate the number of loops so that total time >= 0.2. Calls the timeit method with increasing numbers from the sequence 1, 2, 5, 10, 20, 50, ... until the time taken is at least 0.2 From 5ceceaaf40e55d4ae35ebfdb6c2f5d8326f13c7c Mon Sep 17 00:00:00 2001 From: Xiang Zhang Date: Tue, 28 Feb 2017 10:44:15 +0800 Subject: [PATCH 2/2] use raymond's suggestion --- Lib/timeit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/timeit.py b/Lib/timeit.py index 419bdde3c2b9b1..418166d7918ed8 100755 --- a/Lib/timeit.py +++ b/Lib/timeit.py @@ -206,7 +206,7 @@ def repeat(self, repeat=default_repeat, number=default_number): return r def autorange(self, callback=None): - """Calculate the number of loops so that total time >= 0.2. + """Return the number of loops and time taken so that total time >= 0.2. Calls the timeit method with increasing numbers from the sequence 1, 2, 5, 10, 20, 50, ... until the time taken is at least 0.2