Serhiy Storchaka added the comment:

May be add a guard against statements which can confuse timeit? These are not 
only "return", but "yield", and "break" and "continue" outside of a loop. 
Proposed patch checks that testing code can be compiled outside of a function.

----------
assignee: docs@python -> 
components: +Library (Lib) -Documentation
nosy: +serhiy.storchaka
stage:  -> patch review
versions: +Python 3.5 -Python 3.3
Added file: 
http://bugs.python.org/file37577/timeit_reject_invalid_statements.patch

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

Reply via email to