[Python-3000] Removing simple slicing

Guido van Rossum guido at python.org
Fri Aug 24 18:51:02 CEST 2007


On 8/24/07, Robert Brewer <fumanchu at aminus.org> wrote:
> Thomas Wouters wrote:
>  > The proposed solution, as implemented in the p3yk-noslice
>  > SVN branch, gets rid of the simple slicing methods and
>  > PyType entries. The simple C API (using ``Py_ssize_t``
>  > for start and stop) remains, but creates a slice object
>  > as necessary instead. Various types had to be updated to
>  > support slice objects, or improve the simple slicing case
>  > of extended slicing.
>
>  Am I reading this correctly, that: since the "simple C API
>  remains", one can still write S[3:8] with only one colon
>  and have it work as before? Or would it have to be rewritten
>  to include two colons?

Don't worry, this syntax won't go away; it will be executed differently.

-- 
--Guido van Rossum (home page: http://www.python.org/~guido/)


More information about the Python-3000 mailing list