PEP 284, Integer for-loops
phil hunt
philh at comuno.freeserve.co.uk
Wed Mar 6 19:28:30 EST 2002
On Wed, 06 Mar 2002 09:08:57 -0800 (PST), Sean 'Shaleh' Perry <shalehperry at attbi.com> wrote:
>I am a little confused.
>
>Your proposal starts with the claim that people are looking for a natural way
>to loop over a range of integers.
How about:
for i = 1 to 10:
or
for i is 1 to 10:
I think these are both equally good and both much preferable over
the horrible
for 1 <= i <= 10:
which I can only assume is someone's sick idea of a joke.
This syntax could easily be extend, to allow a step other than 1:
for i = 1 to 10 step 3:
--
<"><"><"> Philip Hunt <philh at comuno.freeserve.co.uk> <"><"><">
"I would guess that he really believes whatever is politically
advantageous for him to believe."
-- Alison Brooks, referring to Michael
Portillo, on soc.history.what-if
More information about the Python-list
mailing list