[Python-ideas] while conditional in list comprehension ??

Mark Hackett mark.hackett at metoffice.gov.uk
Tue Jan 29 13:07:16 CET 2013


On Tuesday 29 Jan 2013, Wolfgang Maier wrote:
> 
> another note: in light of your explanation, it looks like the earlier
>  suggestion of 'else break' would also work without ambiguities since with
>  the rigid logic applied, there would be no doubt which of several 'for'
>  loops gets broken by the 'break'.
> 

Deeply nested loops you want to break out of more than just the current loop 
of are why goto is still warranted in a language.

Rules are there to make you THINK before you break them!



More information about the Python-ideas mailing list