Breaking out of nested loops
Ulf Magnusson
ulf.magnusson at ubm-computing.com
Sat Jan 12 15:44:27 EST 2002
More information about the Python-list mailing list
Sat Jan 12 15:44:27 EST 2002
- Previous message (by thread): Breaking out of nested loops
- Next message (by thread): Breaking out of nested loops
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
"Chris Liechti" <cliechti at gmx.net> wrote in message news:Xns9194B718F5FA2cliechtigmxnet at 62.2.16.82... > "Ulf Magnusson" <ulf.magnusson at ubm-computing.com> wrote in > news:w7Y%7.12719$l93.2807512 at newsb.telia.net: > > > I guess you mean something like this > > ****************** > > for i in ...: > > for j in ....: > > if some_condition: > > magic_break > > code continues here... > > ****************** > > > > There are not supposed to be such a magical break, to my knowledge no > > other language support this either. It kind of breaks the good > > behaviour you expect from a imparative programming language. > > Java does support this! > > loop1: > for(;;) { > for(;;) { > ... > if (...) break loop1; > } > } > > (the labels only work with break statements there is no goto in java.) > However, this is just syntactic suger for a goto.... (ugh :-)
- Previous message (by thread): Breaking out of nested loops
- Next message (by thread): Breaking out of nested loops
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list