How to break out of two nested for loops?

Jason Orendorff jason at jorendorff.com
Fri Jan 25 01:32:40 CET 2002


Bengt Richter wrote:
> Laura Creighton wrote:
> >Last night I got to thinking that instead of _except_
> >what I would like as the keyword is _discover_
> >
> >(just in case any of you plan to write any languages this year ....)
> >
>
> What made you think of 'discover'?
> How about catch ;-)
> Or plain 'on' ?

No, I think 'discover' is in the right direction, if your
goal is to make exceptions seem more fun and appealing.
But even more laid-back is 'experience':

  try:
      search()
  experience GotMyGrooveOn, g:
      print "success!"
      groove()
  else:
      print "failed :-("

## Jason Orendorff    http://www.jorendorff.com/




More information about the Python-list mailing list