why no "do : until"?

Kragen Sitaker kragen at dnaco.net
Sun Dec 31 00:00:17 EST 2000


In article <92m9pm$d19$1 at nnrp1.deja.com>,  <henry_crun3583 at my-deja.com> wrote:
>It does seem to me that "do: while" represents a critically different
>algorithm (ie act, then test information that becomes available as a
>consequence of the action) from "while: ..." (test pre-existing
>information for need or possibility of action, then act)

Yes.  See Knuth, "Structured Programming with Go To Statements", and
examine his proposed loop-while-end construct (which has since been
implemented in TeX and, IIRC, Ada).

The only time I wish I wasn't subject to Python's indentation rules is
when I can't outdent my "if finished(): break" statements like I do in
C.
-- 
<kragen at pobox.com>       Kragen Sitaker     <http://www.pobox.com/~kragen/>
Perilous to all of us are the devices of an art deeper than we possess
ourselves.
       -- Gandalf the White [J.R.R. Tolkien, "The Two Towers", Bk 3, Ch. XI]





More information about the Python-list mailing list