Author icedream91
Recipients icedream91
Date 2013-07-21.09:46:59
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1374400020.0.0.45788018989.issue18518@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2013-07-21 09:47:00icedream91setrecipients: + icedream91
2013-07-21 09:47:00icedream91setmessageid: <1374400020.0.0.45788018989.issue18518@psf.upfronthosting.co.za>
2013-07-21 09:46:59icedream91linkissue18518 messages
2013-07-21 09:46:59icedream91create