[issue24654] PEP 492 - example benchmark doesn't work (TypeError)

Yury Selivanov report at bugs.python.org
Sat Jul 18 08:39:53 CEST 2015


Yury Selivanov added the comment:

Fixed in https://hg.python.org/peps/rev/7ad183c1d9be

I'll quote the commit message here:

    pep-492: Update benchmark code

    Since coroutines now have a distinct type, they do not support
    iteration. Instead of doing 'list(o)', we now do 'o.send(None)'
    until StopIteration.

    Note, that the updated timings are due to the difference of
    doing a loop in Python vs doing it in C ('list()' vs 'while True').

Marcin and Terry, thanks for reporting this!

----------
resolution:  -> fixed
stage: needs patch -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue24654>
_______________________________________


More information about the Python-bugs-list mailing list