summaryrefslogtreecommitdiffstats
path: root/Lib/timeit.py
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2016-10-18 15:55:18 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2016-10-18 15:55:18 (GMT)
commit62cca920db113494df5183c4aad1227c6cd89c60 (patch)
tree1b45b1380f5a45b385637b6018010c1357a6082f /Lib/timeit.py
parentc3e40f8c5bc7eb1c6aa60074c729219ce8881276 (diff)
downloadcpython-62cca920db113494df5183c4aad1227c6cd89c60.zip
cpython-62cca920db113494df5183c4aad1227c6cd89c60.tar.gz
cpython-62cca920db113494df5183c4aad1227c6cd89c60.tar.bz2
timeit: add newlines to output for readability
Issue #28240.
Diffstat (limited to 'Lib/timeit.py')
-rw-r--r--Lib/timeit.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/Lib/timeit.py b/Lib/timeit.py
index 23bdd02..d811294 100644
--- a/Lib/timeit.py
+++ b/Lib/timeit.py
@@ -325,6 +325,9 @@ def main(args=None, *, _wrap_timer=None):
t.print_exc()
return 1
+ if verbose:
+ print()
+
try:
raw_timings = t.repeat(repeat, number)
except:
@@ -347,7 +350,7 @@ def main(args=None, *, _wrap_timer=None):
if verbose:
print("raw times: %s" % ", ".join(map(format_time, raw_timings)))
-
+ print()
timings = [dt / number for dt in raw_timings]
best = min(timings)