[Python-ideas] str(slice(10)) should return "slice(10)"

David Mertz mertz at gnosis.cx
Sat Nov 12 23:32:02 EST 2016


Indeed. I mentioned up-thread that pandas names this IndexSlicer, so it
does exist. And maybe that's a perfectly fine spelling (users can always
give it a shorter name, like ndx)

On Nov 12, 2016 7:07 PM, "Guido van Rossum" <guido at python.org> wrote:

> On Sat, Nov 12, 2016 at 5:46 PM, David Mertz <mertz at gnosis.cx> wrote:
>
>> If we *do* want the name 'slice' as the spelling for the thing that can
>> either be called or indexed to create a slice object, we could probably use
>> some boilerplate like this:
>>
>
> I can't stop you from doing that in your own session, but I don't want to
> reuse the builtin slice object for that. If this is so useful with Pandas
> maybe the Pandas library can define its own helper for this purpose.
>
> --
> --Guido van Rossum (python.org/~guido)
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20161112/3e135cc6/attachment.html>


More information about the Python-ideas mailing list