On Fri, Aug 13, 2021 at 12:00 AM Ricky Teachey <ricky@teachey.org> wrote:
On Thu, Aug 12, 2021 at 9:02 AM Calvin Spealman <cspealma@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.
Ellipsis has a different meaning. None means omitted, Ellipsis means something that most classes ignore (Numpy uses it for "all other dimensions"). ChrisA