switch recipe?

Mark McEahern marklists at mceahern.com
Mon Jul 15 15:31:22 EDT 2002


[Emile van Sebille]
> doesn't this do it?
>
> generated = [color_item(x, alternator) for x  in iterator]
>
> (BTW, I nominate cycler as a name for alternator ;-)

I like cycler, too.  I'm going to post a summary of solutions shortly.  The
above works if you say alternator.next().

// m


-






More information about the Python-list mailing list