[Python-ideas] slice[] to get more complex slices

Jonathan Fine jfine2358 at gmail.com
Mon Jul 23 06:28:04 EDT 2018


Hi Grégory

You wrote:
> Oh yes , I see. Seems like almost everybody think using the [...] syntax to
> define reusable slices is a good idea,

> Not sure slice[1::3] can be done, but this has my preference too: it's the
> most direct exposure I can think of...

The slice class already has all the core functionality it needs. This
thread is looking for something extra. My preference is to create a
new module, slicetools, that contains the functionality the people on
this thread want to have.

What I like about this approach is that the code can be written and
deployed without getting permission from anyone. And when it's done
and has a body of practice, the PEP would simply be "Add slicetools to
the standard library".

Anyone here up for working on that sort of approach?

-- 
Jonathan


More information about the Python-ideas mailing list