Re: Named loops for breaking

2010-03-11 Thread bartc
James Harris wrote: On 10 Mar, 06:29, "Gabriel Genellina" wrote: En Tue, 09 Mar 2010 18:41:10 -0300, Daniel Klein escribi : Basically I'm wondering if there are any plans to implemented named loops in Python, so I can tell a break command to break out of a specific loop in the case of nested

Re: Named loops for breaking

2010-03-10 Thread Alf P. Steinbach
* James Harris: On 10 Mar, 06:29, "Gabriel Genellina" wrote: En Tue, 09 Mar 2010 18:41:10 -0300, Daniel Klein escribi : Basically I'm wondering if there are any plans to implemented named loops in Python, so I can tell a break command to break out of a specific loop in the case of nested l

Re: Named loops for breaking

2010-03-10 Thread James Harris
On 10 Mar, 06:29, "Gabriel Genellina" wrote: > En Tue, 09 Mar 2010 18:41:10 -0300, Daniel Klein   > escribi : > > > Basically I'm wondering if there are any plans to implemented named > > loops in Python, so I can tell a break command to break out of a > > specific loop in the case of nested loop

Re: Named loops for breaking

2010-03-10 Thread Daniel Klein
Thanks for the link to the PEP. I should search through PEPs first next time :) Okay, I understand Guido's reasoning and yield the point. I typed up the specific example in which I came across this problem and, while doing so, realized there's a much better way of approaching the problem, so thank

Re: Named loops for breaking

2010-03-10 Thread Jean-Michel Pichavant
Daniel Klein wrote: Hey, I did a little searching and couldn't really find much recent on this. The only thing I found was this: http://groups.google.com/group/comp.lang.python/browse_thread/thread/a696624c92b91181/5b7479fdc3362b83?lnk=gst&q=break+named+loop#5b7479fdc3362b83 Basically I'm wond

Re: Named loops for breaking

2010-03-09 Thread Gabriel Genellina
En Tue, 09 Mar 2010 18:41:10 -0300, Daniel Klein escribió: Basically I'm wondering if there are any plans to implemented named loops in Python, so I can tell a break command to break out of a specific loop in the case of nested loops. See PEP3136 [1] and its rejection note [2] I think you m

Re: Named loops for breaking

2010-03-09 Thread alex23
Daniel Klein wrote: > Basically I'm wondering if there are any plans to implemented named > loops in Python, so I can tell a break command to break out of a > specific loop in the case of nested loops. You should be able to do this with the goto module: http://entrian.com/goto/ But please note t

Re: Named loops for breaking

2010-03-09 Thread Paul Rubin
Daniel Klein writes: > Basically I'm wondering if there are any plans to implemented named > loops in Python, so I can tell a break command to break out of a > specific loop in the case of nested loops. Currently I'm using boolean > flag variables, but I find that very clumsy. The usual way to do

Named loops for breaking

2010-03-09 Thread Daniel Klein
Hey, I did a little searching and couldn't really find much recent on this. The only thing I found was this: http://groups.google.com/group/comp.lang.python/browse_thread/thread/a696624c92b91181/5b7479fdc3362b83?lnk=gst&q=break+named+loop#5b7479fdc3362b83 Basically I'm wondering if there are any