[Python-ideas] slice.literal notation

Joseph Jevnik joejev at gmail.com
Wed Jun 10 21:18:24 CEST 2015


Ethan, I am also not 100% on the new repr, I just wanted to propose this
change. In the issue, I have separated that change into it's own patch to
make it easier to apply the slice.literal without the repr update.

On Wed, Jun 10, 2015 at 3:16 PM, Ethan Furman <ethan at stoneleaf.us> wrote:

> 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.
>>
>
> +1
>
>
>  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.
>>
>
> -1
>
> Having the old repr makes it possible to see what the equivalent slice()
> spelling is.
>
> --
> ~Ethan~
>
> _______________________________________________
> Python-ideas mailing list
> Python-ideas at python.org
> https://mail.python.org/mailman/listinfo/python-ideas
> Code of Conduct: http://python.org/psf/codeofconduct/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20150610/88839f78/attachment.html>


More information about the Python-ideas mailing list