Arithmetic sequences in Python

Alex Martelli aleax at
Mon Jan 16 15:08:14 EST 2006

Roy Smith <roy at> wrote:

> Alex Martelli <aleax at> wrote:
> >Agreed.  *IF* we truly needed an occasional "up to X *INCLUDED*"
> >sequence, it should be in a syntax that can't FAIL to be noticed, such
> >as range(X, endincluded=True).
> How about...
> for i in (0..x]:
>     blah

The difference between a round parenthesis and a square bracket can
EASILY be overlooked, depending partly on what font you're using.


More information about the Python-list mailing list