[Python-ideas] slice.literal notation
ethan at stoneleaf.us
Wed Jun 10 21:16:42 CEST 2015
On 06/10/2015 08:33 AM, Joseph Jevnik wrote:
> The basic idea is to provide an alternative constructor to 'slice' that uses
> the subscript syntax. This allows people to write more understandable code.
> There is a second change proposed here and that is to 'slice.__repr__'. This
> change makes the repr of a slice object match the new literal syntax to make
> it easier to read.
Having the old repr makes it possible to see what the equivalent slice() spelling is.
More information about the Python-ideas