New submission from icedream91:

When I ran code below, it printed -1. The question is, the code in variable 
snippet, has wrong syntax, it can't be run. I think timeit should return only 
non-negative float type.


from timeit import timeit

snippet="""
for i in range(10):
    return -1
"""

print(timeit(snippet))


Thanks.

----------
components: Library (Lib)
messages: 193429
nosy: icedream91
priority: normal
severity: normal
status: open
title: timeit bug?
type: behavior
versions: Python 3.3

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue18518>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to