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

Brett Cannon brett at python.org
Mon Oct 28 14:57:43 CET 2013


On Sun, Oct 27, 2013 at 7:20 PM, Antoine Pitrou <solipsis at pitrou.net> wrote:

> On Sun, 27 Oct 2013 16:56:34 -0500
> Tim Peters <tim.peters at gmail.com> wrote:
> > [Guido]
> > > I wouldn't take out negative strides completely, but I might consider
> > > deprecating lower and upper bounds other than None (== missing). So
> a[::-1]
> > > would still work, and a[None:None:-1] would be a verbose way of
> spelling the
> > > same,
> >
> > Happy idea.
> >
> > > but a[-1:-6:-1] would be deprecated.
> >
> > Not sure I've _ever_ seen that in real life.
>
> If it's never seen in real life, then there's probably no urge to
> deprecate it and later replace it with a new thing, IMHO.
>

I think there is to minimize even the chance someone has done something
like this since it's so wonky. We all know someone has somewhere in code
out in the world.

+1 on doing a deprecation in 3.4.


>
> Also, I get the feeling it's a bit early to start talking about
> Python 4 (is that supposed to happen at all?).
>

Well, I'm sure there will be one after 3.9, but probably more along the
lines of "everything previously deprecated has now been removed" rather
than the 2->3 shift.

-Brett


>
> Regards
>
> Antoine.
>
>
> _______________________________________________
> Python-ideas mailing list
> Python-ideas at python.org
> https://mail.python.org/mailman/listinfo/python-ideas
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20131028/58f402a1/attachment-0001.html>


More information about the Python-ideas mailing list