Home | History | Annotate | Download | only in python2.7

Lines Matching refs:stmt

78 # in Timer.__init__() depend on setup being indented 4 spaces and stmt
85 %(stmt)s
121 def __init__(self, stmt="pass", setup="pass", timer=default_timer):
125 if isinstance(stmt, basestring):
126 stmt = reindent(stmt, 8)
129 src = template % {'stmt': stmt, 'setup': setup}
131 src = template % {'stmt': stmt, 'setup': '_setup()'}
139 elif hasattr(stmt, '__call__'):
147 self.inner = _template_func(setup, stmt)
149 raise ValueError("stmt is neither a string nor callable")
227 def timeit(stmt="pass", setup="pass", timer=default_timer,
230 return Timer(stmt, setup, timer).timeit(number)
232 def repeat(stmt="pass", setup="pass", timer=default_timer,
235 return Timer(stmt, setup, timer).repeat(repeat, number)
262 stmt = "\n".join(args) or "pass"
294 t = Timer(stmt, setup, timer)