Concrete Proposal: while ... and while ...
Chad Netzer
chad at vision.arc.nasa.gov
Wed May 19 21:53:50 EDT 1999
Phil Hunt wrote:
> IMO allowing ``while:'', meaning ``while 1:'' is a reasonable shortcut.
I think "while:" is too terse, and could be confusing; I'd rather the
language predefine something like the following;
True = (0==0) # Create a `True' boolean object
False = (0==1) # Create a `False' boolean object
and then everyone could easily say, "while True:"
This looks a lot nicer then "while 1:" and is not confusing (IMO). Of
course, you can already do this, and in fact, I often do. So, should these
two objects be predefined in a future Python? In general, I'd rather keep
terseness out of Python (without being needlessly verbose, of course).
I agree that "and while" suffers from the indentedness problem; however
I'd rather have it at the indentation of the matching while, then a level in
where it might be construed as a new loop.
Chad Netzer
More information about the Python-list
mailing list