PEP 234: Iterators
Roman Suzi
rnd at onego.ru
Mon May 7 09:51:26 EDT 2001
On Mon, 7 May 2001, Neil Schemenauer wrote:
> Roman Suzi wrote:
> > The problem with the PEP 204 is that proposed syntax
> > is very confuing and asking to make an error.
> >
> > But I am sure that Python need nicier range, than range.
> > Even if it will be as in Perl: 1 .. 10
> > or more "pythonish" 1 ... 10
>
> So grab PEP 204 and create a new PEP from it with your proposed
> syntax.
I am not sure abput "reference implementation" part.
And also the proposed syntax has very narrow application:
only for range(start, end+1) things.
Any other additions almost certainly will add non-clarity.
OK. Probably
1, 3 ... 11
is right way to specify the equivalent of
range(1, 11+1, 3-1)
(Note the diff)
eg:
>>> for i in 1, 3 ... 11:
... print i
...
1
3
5
7
9
11
Sincerely yours, Roman A.Suzi
--
- Petrozavodsk - Karelia - Russia - mailto:rnd at onego.ru -
More information about the Python-list
mailing list