[Python-ideas] Deprecate "slice" on built-ins, move it to "types"?

Nathaniel Smith njs at pobox.com
Thu Dec 28 20:06:07 EST 2017

On Dec 28, 2017 12:10, "Joao S. O. Bueno" <jsbueno at python.org.br> wrote:

This is probably too little  to justify the compatibility breakage, but is
there a motive for the "slice" type to be on built-ins ?
(besides people forgot it there at PEP-3000 time?)

It is normally used in super-specialized cases, mostly when one is
implementing a Sequence type, and even there just for type-checking,
not to create new slice objects.

It does get called sometimes in numerical code to construct complex
indexing operations.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20171228/45149d96/attachment-0001.html>

More information about the Python-ideas mailing list