send() to a generator in a "for" loop with continue(val)??
aahz at pythoncraft.com
Sat Apr 18 17:19:27 CEST 2009
In article <07ad771b-a6d1-4f08-b16c-07caf74623c3 at e18g2000yqo.googlegroups.com>,
Michele Simionato <michele.simionato at gmail.com> wrote:
>On Apr 18, 3:03=A0pm, a... at pythoncraft.com (Aahz) wrote:
>> In article <gsc7e1$rj6$0... at news.t-online.com>,
>> Peter Otten =A0<__pete... at web.de> wrote:
>>>If it were up to me I'd rip out send() immediatly. At first I thought I
>>>would see a compelling use case and be enlightened, but it never happened.
>> Too late -- it's likely to get an upgrade for 3.1 and 2.7. Basically,
>> send() is useful for coroutines, and if you haven't yet read
>> you really should (assuming you want to continue arguing).
>I suspect Peter knows everything about coroutines and still he is not
>convinced about .send. FWIW, I am sympathic with him.
Okay, I'm curious, is the argument that you shouldn't use generators for
coroutines or something else?
Aahz (aahz at pythoncraft.com) <*> http://www.pythoncraft.com/
"If you think it's expensive to hire a professional to do the job, wait
until you hire an amateur." --Red Adair
More information about the Python-list