Skip to content

Commit 4fb9492

Browse files
committed
strip leading and trailing whitespaces from source
1 parent 7f9cc56 commit 4fb9492

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Lib/timeit.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ def __init__(self, stmt="pass", setup="pass", timer=default_timer,
150150
else:
151151
raise ValueError("stmt is neither a string nor callable")
152152
src = template.format(stmt=stmt, setup=setup, init=init,
153-
global_setup=global_setup)
153+
global_setup=global_setup).strip()
154154
self.src = src # Save for traceback display
155155
code = compile(src, dummy_src_name, "exec", **compile_options)
156156
exec(code, global_ns | local_setup_ns, local_ns)

0 commit comments

Comments
 (0)