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

Roman Neuhauser neuhauser at mail.cz
Sat Apr 27 19:14:48 EDT 2002


> From: Alex Martelli <aleax at aleax.it>
> Subject: Re: slices: foo[i:j:k] => TypeError
> To: python-list at python.org
> Date: Sat, 27 Apr 2002 20:15:07 GMT
> 
> 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.
 
    quite some time, isn't it? :)

> >     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).

    No, thanks. I'll stick with NotImplemented or sumsuch. I just found
    it interesting that the manual describes something that's not even
    meant to work.

    Thanks for the info!

-- 
FreeBSD 4.4-STABLE
1:13AM up 12 days, 14:25, 9 users, load averages: 0.00, 0.02, 0.00





More information about the Python-list mailing list