On 31 Oct 2013 07:14, "Greg Ewing" <greg.ewing@canterbury.ac.nz> wrote:
>
> Paul Moore wrote:
>>
>> I would definitely use
>>
>>     b = a[::-1]
>>
>> over
>>
>>     b = a[Slice(None, None, None, reversed=True)]
>
>
> Indeed, the whole reason for having slice syntax is that
> it's very concise. One of the things I like most about
> Python is that I get to write s[a:b] instead of something
> like s.substr(a, b).
>
> I would be very disappointed if I were forced to use
> the above monstrosity in some cases.

You can't have new syntax without defining the desired semantics for that syntax first. Since slices are just objects, it doesn't make sense to argue about syntactic details until the desired semantics are actually clear and demonstrated in an object based proof-of-concept.

Cheers,
Nick.

>
> --
> Greg
> _______________________________________________
> Python-ideas mailing list
> Python-ideas@python.org
> https://mail.python.org/mailman/listinfo/python-ideas