why no "do : until"?

henry_crun3583 at my-deja.com henry_crun3583 at my-deja.com
Sun Dec 31 04:39:34 CET 2000


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)

Fudging "while: " to do the same thing offers the potential or probable
result that subsequent changes will take it literally as a test-then-
act.

As an aside sometimes I think having both while and until in one
statement would simplify it while still making logical sense..

while file.data_available :
  a=file.read;
  b=process(a)
  until b==DesiredValue


Sent via Deja.com
http://www.deja.com/



More information about the Python-list mailing list