[Python-ideas] Where did we go wrong with negative stride?

Philipp A. flying-sheep at web.de
Tue Oct 29 00:17:32 CET 2013


Am 28.10.2013 16:08 schrieb "Brett Cannon" <brett at python.org>:
> The deprecation would be in there from now until Python 4 so it wouldn't
be sudden (remember that we are on a roughly 18 month release cycle, so if
this went into 3.4 that's 7.5 years until this changes in Python 4).

I don't get your calculation: after 3.9 clearly follows 3.10, as versions
aren't decimal numbers, but tuples of integers.

So we have 1.5×X years, with X being any number from 1 to infinity that
Guido deems suitable.

@proposal:
-1 for explicit impliciticity in slicing syntax, as it's ass complicated as
it sounds (when phrased like I just did) and noisier than obfuscated C

+1 for deprecating negative slicing, and teaching people to use reversed.

But I think we should consider adding some sort of slice view function,
since list[::2] already creates a copy, and reversed(list[::2]) creates two.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20131029/78a5c70f/attachment-0001.html>


More information about the Python-ideas mailing list