2018-07-23 8:16 GMT-07:00 Guido van Rossum <gu...@python.org>:

> On Mon, Jul 23, 2018 at 3:24 AM, Jeroen Demeyer <j.deme...@ugent.be>
> wrote:
>
>> On 2018-07-23 11:58, Grégory Lielens wrote:
>>
>>> Not sure slice[1::3] can be done
>>>
>>
>> It can be done. Since "slice" is a class, it would require a metaclass
>> though.
>>
>
> Since PEP 560 it won't need a metaclass -- it can be implemented as
> __class_getitem__.
>
> But that brings up the related problem that `slice[]` for creating slice
objects would now conflict with typing syntax. And we might reasonably make
`slice` generic in the future: https://github.com/python/typing/issues/159.

> --
> --Guido van Rossum (python.org/~guido)
>
> _______________________________________________
> Python-ideas mailing list
> Python-ideas@python.org
> https://mail.python.org/mailman/listinfo/python-ideas
> Code of Conduct: http://python.org/psf/codeofconduct/
>
>
_______________________________________________
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to