On Mon, Jul 23, 2018 at 6:28 AM, Jonathan Fine <jfine2358@gmail.com> wrote:
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?
I only proposed on very limited thing here. My thought was that if it wasn't accepted in the slice class the next best place would be a dedicated class in boltons or toolz or some package like that. Besides the __getitem__ --> slice classmethod, what other functionality do you think is needed in such a module?