Re: Zen of Python

From: Aahz (aahz_at_pythoncraft.com)
Date: 01/24/05


Date: 24 Jan 2005 08:48:05 -0500

In article <mailman.923.1106196903.22381.python-list@python.org>,
Tim Peters <tim.peters@gmail.com> wrote:
>[Paul Rubin]
>>
>> And you can break out of a containing loop from a nested loop
>> with try/raise.
>
>Heh heh. Yes, you can. I've never seen a real Python program that
>did, but there's nothing to stop you. What did you think the "direct"
>in "direct way" might have been intended to mean?

Actually, I like breaking out of nested "search" loops with try/except.

-- 
Aahz (aahz@pythoncraft.com)           <*>         http://www.pythoncraft.com/
"19. A language that doesn't affect the way you think about programming,
is not worth knowing."  --Alan Perlis


Relevant Pages

  • Re: Newbie: whats Ruby idiom for word-by-word input?
    ... If you want to read to word boundaries only it becomes more difficult. ... you can use #getc and implement the word matching logic ... anyway the nested loop approach yields the proper result (aka sequence ...
    (comp.lang.ruby)
  • Re: How to break a while loop inside a switch statement?
    ... You have never needed out of a nested loop? ... There are times when a simple nested loop of 2-4ish levels is easier to ... read and maintain than having each loop level in its own method. ... latter might often require extra fields or parameters to be introduced ...
    (comp.lang.java.programmer)
  • Re: How to break a while loop inside a switch statement?
    ... You have never needed out of a nested loop? ... There are times when a simple nested loop of 2-4ish levels is easier to ... read and maintain than having each loop level in its own method. ... latter might often require extra fields or parameters to be introduced ...
    (comp.lang.java.programmer)
  • Re: nested for loops, homework help
    ... |>have a for loop, with a for loop inside, one nested loop. ... | the second generating the line itself. ... | int const spaces); ...
    (alt.comp.lang.learn.c-cpp)
  • Re: problems with throw/catch (newbie)
    ... Ruby force you to use catch/throw (which intuitively seems like ... but the reason I asked is that I anticipate having to break ... Interestingly I cannot remember having to break from a nested loop. ...
    (comp.lang.ruby)