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

Brett Cannon brett at python.org
Tue Oct 29 14:39:23 CET 2013


On Mon, Oct 28, 2013 at 7:17 PM, Philipp A. <flying-sheep at web.de> wrote:

>
> 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.
>

Because Guido (and I as well) doesn't like minor version numbers that go
past single digits, so the chances of 3.10 are very slim. That's why I put
a cap on the possible number of years before something gets removed.

-Brett


> @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/6bebd498/attachment.html>


More information about the Python-ideas mailing list