[Python-ideas] More useful slices

Paul Moore p.f.moore at gmail.com
Mon Feb 2 13:48:51 CET 2015


On 2 February 2015 at 10:22, Todd <toddrjen at gmail.com> wrote:
> Let's just call this a range literal.  It has some features similar to
> slices, but not all.

So what would d[1:10:2] mean? d[Slice(1,10,2)] or d[range(1,10,2)]?

At the moment 1:10:2 is a slice literal, and you're proposing to
repurpose it as a range literal? What have I missed? Because that's
never going to satisfy backward compatibility requirements.

Paul


More information about the Python-ideas mailing list