[Python-ideas] PEP 530: Asynchronous Comprehensions

Sven R. Kunze srkunze at mail.de
Tue Sep 6 14:24:41 EDT 2016


Hi Srinivas,

On 06.09.2016 05:46, srinivas devaki wrote:
> On Tue, Sep 6, 2016 at 6:46 AM, Yury Selivanov <yselivanov.ml at gmail.com> wrote:
>> Hi Sven,
>>
>> I doubt that anybody ever would write something like that; this is just
>> examples of what the PEP will enable.
> using the same object as iterator and async generator, may be not.
> but isn't it good to write code for sync iteration and async iteration
> in the same class?
> so that if I'm writing a library, I can say that the library supports both.

oh, wrong territory here!

Python async community wants you to write everything twice: for the sync 
and async case. And don't dare to mentioned code sharing here. They will 
rip you apart. ;)


Just kidding. Of course would it be great to write code only once but 
Yury want to preserve well-paid Python dev jobs in the industry because 
everything here needs to be maintained twice then. ;)


No really, I have absolutely no idea why you need to put that "async" in 
all places where Python can detect automatically if it needs to perform 
an async iteration or not. Maybe, Yury can explain.


Cheers,
Sven


More information about the Python-ideas mailing list