New submission from Marcin Szewczyk:

Using benchmark from the section 
https://www.python.org/dev/peps/pep-0492/#async-await raises:
Traceback (most recent call last):
  File "./bench.py", line 28, in <module>
    timeit(abinary, 19, 30)
  File "./bench.py", line 23, in timeit
    list(gen(depth))
TypeError: 'coroutine' object is not iterable

Am I missing something or is a correction needed in code or documentation?

BTW, PEP 492 uses the term "plain generator", but unlike "generator-based 
coroutine" or "native coroutine" it's not defined in section 
https://www.python.org/dev/peps/pep-0492/#glossary. I think adding a definition 
would be beneficial.

----------
assignee: docs@python
components: Documentation, asyncio
messages: 246856
nosy: docs@python, gvanrossum, haypo, wodny, yselivanov
priority: normal
severity: normal
status: open
title: PEP 492 - example benchmark doesn't work (TypeError)
type: enhancement
versions: Python 3.5

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

Reply via email to