Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #5654 > unrolled thread

Re: in search of graceful co-routines

Started byIan Kelly <ian.g.kelly@gmail.com>
First post2011-05-17 23:46 -0600
Last post2011-05-17 23:46 -0600
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: in search of graceful co-routines Ian Kelly <ian.g.kelly@gmail.com> - 2011-05-17 23:46 -0600

#5654 — Re: in search of graceful co-routines

FromIan Kelly <ian.g.kelly@gmail.com>
Date2011-05-17 23:46 -0600
SubjectRe: in search of graceful co-routines
Message-ID<mailman.1741.1305697618.9059.python-list@python.org>
On Tue, May 17, 2011 at 11:27 PM, Chris Withers <chris@simplistix.co.uk> wrote:
> Yes, but it's this kind of birds nest I'm trying to avoid...

I was actually kind of hoping you might see it that way.  That's about
as simple as you're going to get using a generator for this, though.
I'll second Terry's suggestion on this:  forget using a generator for
the provider, and instead create an iterator class with regular
methods to decouple the push logic from the pull logic.  I think
you'll be glad that you did.

Cheers,
Ian

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web