Re: context managers and generators

2007-01-12 Thread Bjoern Schliessmann
Laszlo Nagy wrote: >> I'm still thinking there is a better way to do it, and would >> appreciate any ideas. > > Everything can be implemented with goto and arrays. But is that really better? Regards, Björn -- BOFH excuse #174: Backbone adjustment -- http://mail.python.org/mailman/list

Re: context managers and generators

2007-01-12 Thread Laszlo Nagy
> I'm still thinking there is a better way to do it, and would appreciate > any ideas. > Everything can be implemented with goto and arrays. http://entrian.com/goto/ :-P -- http://mail.python.org/mailman/listinfo/python-list

Re: context managers and generators

2007-01-12 Thread [EMAIL PROTECTED]
Jean-Paul Calderone wrote: > On 12 Jan 2007 06:17:01 -0800, [EMAIL PROTECTED] wrote: > >I'm happily using context managers and co-routines, and would like to > >use both at the same time, e.g. > > Python has generators, not co-routines. They may be called generators, but I'm using them as co-routi

Re: context managers and generators

2007-01-12 Thread Jean-Paul Calderone
On 12 Jan 2007 06:17:01 -0800, [EMAIL PROTECTED] wrote: >I'm happily using context managers and co-routines, and would like to >use both at the same time, e.g. Python has generators, not co-routines. > >with foo(): >... >x = yield y >... > >In this code multiple copies