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

Grégory Lielens gregory.lielens at gmail.com
Mon Jul 23 05:58:48 EDT 2018


Oh yes , I see. Seems like almost everybody think using the [...] syntax to 
define reusable slices is a good idea, the discussion is where this could 
be implemented, knowing that numpy.s_ already exists.

Discussion is not easy to follow, with the patch almost accepted then 
delayed then rejected, in a very short amount of time.

In particular, it's not clear why direct indexing of slice type (not 
instance) was not chosen. It was the first proposal, and here again Todd's 
choice. it was silently skipped/changed to slice.literal then moved to 
operators, at least that's the impression I got reading  
https://bugs.python.org/issue24379 ...
Not sure slice[1::3] can be done, but this has my preference too: it's the 
most direct exposure I can think of...


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20180723/159ddf0f/attachment.html>


More information about the Python-ideas mailing list