On Thu, Aug 12, 2021 at 9:02 AM Calvin Spealman <cspea...@redhat.com> wrote:

> An alternative suggestion, which works today (... is a valid object called
> Ellipsis):
>
>    Foobar.search(
>         attr1="foo",
>         attr2=[10, ...],
>         attr3=[42, ..., 50]
>     )
>

This got me thinking just now: allowing ellipses instead of None for the
first two arguments of the slice() constructor might be a neat idea.

These looks pretty nice:

slice(1, ...)
slice(1, ...,  2)
slice(-1, ..., -1)
slice(..., ..., 3)

I wonder if-- had the ellipses existed when slice() was created eons ago/in
the depths of time-- whether ... would have been used rather than None for
these.

I'm not really proposing this, just musing.

---
Ricky.

"I've never met a Kentucky man who wasn't either thinking about going home
or actually going home." - Happy Chandler
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/G6SEJX5OE2VSVELHGTV4ZOSQNPHWGMPZ/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to