slices: foo[i:j:k] => TypeError

Alex Martelli aleax at aleax.it
Sat Apr 27 16:15:07 EDT 2002


Roman Neuhauser wrote:
        ...
>     Ok. What I don't understand then is why is extended slicing
>     described among primaries in the language reference. And I'm not

Because the parser needs to know about it (to support Numeric).  Indeed,
it's not a syntax error that you're getting.

>     talking about a development version of the manual, I'm talking about
>     the 2.1 version.

I think it was introduced in 1.5.2.

>     What's the expected date for the builtin types to accept slice
>     objects?

No idea.  The original intro was before PEPs, so there's not even a
PEP to refer to, I believe.  You may want to ask on Python-Dev --
if the BDFL OK's it for 2.3, I can write the code, if you or some other
volunteer can handle the rest of the patch submissal process (sorry,
can't volunteer more time than what it takes to write & debug the code).


Alex




More information about the Python-list mailing list