[Python-Dev] PEP 492: async/await in Python; version 4
Jim J. Jewett
jimjjewett at gmail.com
Tue May 5 23:31:02 CEST 2015
Tue May 5 21:48:36 CEST 2015, Yury Selivanov wrote:
> As for terminology, I view this discussion differently. It's
> not about the technical details (Python has asymmetric
> coroutines, that's it), but rather on how to disambiguate
> coroutines implemented with generators and yield-from, from
> new 'async def' coroutines.
Not just "How?", but "Why?".
Why do they *need* to be disambiguated?
With the benefit of having recently read all that discussion
(as opposed to just the PEP), my answer is ... uh ... that
generators vs "async def" is NOT an important distinction.
What matters (as best I can tell) is:
"something using yield (or yield from) to mark execution context switches"
"other kinds of callables, including those using yield to make an iterator"
I'm not quite sure that the actual proposal even really separates them
effectively, in part because the terminology keeps suggesting other
distinctions instead. (The glossary does help; just not enough.)
If there are still threading problems with my replies, please
email me with details, so that I can try to resolve them. -jJ
More information about the Python-Dev