On Wed, Apr 22, 2015 at 8:40 AM, Yury Selivanov <yselivanov...@gmail.com> wrote: > > On the one hand I like your idea to disallow calling > coroutines without a special keyword (await in case of > PEP 492). It has downsides, but there is some > elegance in it. On the other hand, I hate the idea > of grammatically requiring parentheses for 'await' > expressions. That feels non-pytonic to me. > > I'd be happy to hear others opinion on this topic. >
I'm slowly warming up to Greg's notion that you can't call a coroutine (or whatever it's called) without a special keyword. This makes a whole class of bugs obvious the moment the code is executed. OTOH I'm still struggling with what you have to do to wrap a coroutine in a Task, the way its done in asyncio by the Task() constructor, the loop.create_task() method, and the async() function (perhaps to be renamed to ensure_task() to make way for the async keyword). -- --Guido van Rossum (python.org/~guido)
_______________________________________________ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com