why no break N levels, as in other leading languages?

Cameron Laird claird at lairds.com
Thu May 1 20:37:10 EDT 2003


In article <b8scat$q74$1 at panix2.panix.com>, Aahz <aahz at pythoncraft.com> wrote:
>In article <87ptn2xx5o.fsf at jidanni.org>,
>Dan Jacobson  <jidanni at dman.ddts.net> wrote:
>>
>>... oops, where were we? Anyway, in python did he forget
>>about giving it a N ability or is there of course some higher
>>principle involved?
>
>class BreakException(Exception):
>    pass
>
>try:
>    for i in range(foo):
>        for j in range(bar):
>            for k in range(spam):
>                if my_func():
>                    raise BreakException
>except BreakException:
>    pass
			.
			.
			.
I salute Aahz by summarizing in English:  YES, Python
offers a strictly more expressive model.  She aptly
exemplifies it above.
-- 

Cameron Laird <Cameron at Lairds.com>
Business:  http://www.Phaseit.net
Personal:  http://phaseit.net/claird/home.html




More information about the Python-list mailing list