Ramchandra Apte added the comment: Well, not sure if this is worth fixing, I think this is because timeit runs a modified version of the code using exec(), with the actual code to be timed within a function. (timeit runs something like this with exec():
def actual_code(): #The real code for i in range(10): return -1 <some other code> actual_code() ---------- nosy: +Ramchandra Apte _______________________________________ 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