This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author rhettinger
Recipients Arfrever, BreamoreBoy, James.Lu, numerodix, pitrou, rhettinger
Date 2013-10-21.02:57:34
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1382324254.57.0.342754872427.issue19318@psf.upfronthosting.co.za>
In-reply-to
Content
FWIW, the usual ways to handle the double-break problem are:

* check a flag variable in the outer loop

* put the outer loop and inner loop in a function so that a return-statement can be used to exit both loops

* enclose the outer-loop in a try/except, then raise an exception to end the inner-loop

Your multi-break idea isn't crazy.  IIRC, Knuth discussed the idea (along with others such as labeled breaks) in one of his influential papers on structure programmiing.  That said, the idea didn't catch on and most people seem to be able to live easily without it.
History
Date User Action Args
2013-10-21 02:57:34rhettingersetrecipients: + rhettinger, pitrou, Arfrever, BreamoreBoy, James.Lu, numerodix
2013-10-21 02:57:34rhettingersetmessageid: <1382324254.57.0.342754872427.issue19318@psf.upfronthosting.co.za>
2013-10-21 02:57:34rhettingerlinkissue19318 messages
2013-10-21 02:57:34rhettingercreate