STINNER Victor added the comment: > python -m timeit "sum([x * x * 1 for x in range(100)])"
If you only want to benchmark x*y, x+y and list-comprehension, you should use a tuple for the iterator. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue21955> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com