Is this PEP-able? fwhile
Neil Hodgson
nhodgson at iinet.net.au
Tue Jun 25 03:20:43 EDT 2013
jimjhb at aol.com:
> Syntax:
> fwhile X in ListY and conditionZ:
There is precedent in Algol 68:
for i from 0 to n while safe(i) do .. od
which would also make a python proposal that needs no new key words:
for i in range(n) while safe(i): ..
The benefit of the syntax would be to concentrate the code
expressing the domain of the loop rather than have it in separate locations.
Not a big win in my opinion.
Neil
More information about the Python-list
mailing list