On Sat, Apr 26, 2008 at 2:49 PM, Facundo Batista
<[EMAIL PROTECTED]> wrote:

>  Which should the range() definition be, in your words?

In terms of ABCs,  range(..) is a Sized Iterable in the current
implementation.  It is not a Sequence because it is not a Container
and does not support slicing.  The idea to support x in range(..) was
discussed last year [1]  and appears to have been accepted but not
implemented. I understand that slicing support is in the works. [2]

I believe it would make sense to turn range(..) into a Sequence.  Here
are my reasons:

1. It will be easy to explain what range(..) is: "a sequence of
integers from start to stop, excluding stop, skipping step".

2. There will be fewer 2 to 3 incompatibilities.

[1] http://mail.python.org/pipermail/python-3000/2007-July/009028.html
[2] http://bugs.python.org/msg65807
_______________________________________________
Python-3000 mailing list
Python-3000@python.org
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com

Reply via email to