slicings: 3 questions
gagsl-py2 at yahoo.com.ar
Fri Jan 30 01:09:56 CET 2009
En Thu, 29 Jan 2009 19:41:28 -0200, Robert Kern <robert.kern at gmail.com>
> On 2009-01-29 15:33, Alan G Isaac wrote:
>> On 1/29/2009 1:37 PM Chris Rebert apparently wrote:
>>> Also, more fundamentally, Python is liberal in what it allows for the
>>> parts of slices, so unifying slices with ranges would break code. For
>>> example, Python is perfectly happy if I go slice("a",,object), none
>>> of which are even numbers.
>> Ah, this is new in Python 3 I take it?
[test using 2.5.1]
Just out of curiosity, I tried with the oldest Python I have:
Python 1.5.2 (#0, Apr 13 1999, 10:51:12) [MSC 32 bit (Intel)] on win32
Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
slice('a', , 3j)
So, no, it's far for being a new feature...
More information about the Python-list