Lines Matching refs:stmt
67 # in Timer.__init__() depend on setup being indented 4 spaces and stmt
74 {stmt}
102 def __init__(self, stmt="pass", setup="pass", timer=default_timer,
121 if isinstance(stmt, str):
123 compile(stmtprefix + stmt, dummy_src_name, "exec")
124 stmt = reindent(stmt, 8)
125 elif callable(stmt):
126 local_ns['_stmt'] = stmt
128 stmt = '_stmt()'
130 raise ValueError("stmt is neither a string nor callable")
131 src = template.format(stmt=stmt, setup=setup, init=init)
231 def timeit(stmt="pass", setup="pass", timer=default_timer,
234 return Timer(stmt, setup, timer, globals).timeit(number)
236 def repeat(stmt="pass", setup="pass", timer=default_timer,
239 return Timer(stmt, setup, timer, globals).repeat(repeat, number)
272 stmt = "\n".join(args) or "pass"
315 t = Timer(stmt, setup, timer)