@@ -69,7 +69,7 @@ The module defines three convenience functions and a public class:
6969 The optional *globals * parameter was added.
7070
7171
72- .. function :: repeat(stmt='pass', setup='pass', timer=<default timer>, repeat=3 , number=1000000, globals=None)
72+ .. function :: repeat(stmt='pass', setup='pass', timer=<default timer>, repeat=5 , number=1000000, globals=None)
7373
7474 Create a :class: `Timer ` instance with the given statement, *setup * code and
7575 *timer * function and run its :meth: `.repeat ` method with the given *repeat *
@@ -79,6 +79,9 @@ The module defines three convenience functions and a public class:
7979 .. versionchanged :: 3.5
8080 The optional *globals * parameter was added.
8181
82+ .. versionchanged :: 3.7
83+ Default value of *repeat * changed from 3 to 5.
84+
8285.. function :: default_timer()
8386
8487 The default timer, which is always :func: `time.perf_counter `.
@@ -150,7 +153,7 @@ The module defines three convenience functions and a public class:
150153 .. versionadded :: 3.6
151154
152155
153- .. method :: Timer.repeat(repeat=3 , number=1000000)
156+ .. method :: Timer.repeat(repeat=5 , number=1000000)
154157
155158 Call :meth: `.timeit ` a few times.
156159
@@ -171,6 +174,9 @@ The module defines three convenience functions and a public class:
171174 should be interested in. After that, you should look at the entire
172175 vector and apply common sense rather than statistics.
173176
177+ .. versionchanged :: 3.7
178+ Default value of *repeat * changed from 3 to 5.
179+
174180
175181 .. method :: Timer.print_exc(file=None)
176182
@@ -208,7 +214,7 @@ Where the following options are understood:
208214
209215.. cmdoption :: -r N, --repeat=N
210216
211- how many times to repeat the timer (default 3 )
217+ how many times to repeat the timer (default 5 )
212218
213219.. cmdoption :: -s S, --setup=S
214220
@@ -246,7 +252,7 @@ successive powers of 10 until the total time is at least 0.2 seconds.
246252:func: `default_timer ` measurements can be affected by other programs running on
247253the same machine, so the best thing to do when accurate timing is necessary is
248254to repeat the timing a few times and use the best time. The :option: `-r `
249- option is good for this; the default of 3 repetitions is probably enough in
255+ option is good for this; the default of 5 repetitions is probably enough in
250256most cases. You can use :func: `time.process_time ` to measure CPU time.
251257
252258.. note ::
0 commit comments