On Tue, Aug 25, 2020, 05:10 Steven D'Aprano <st...@pearwood.info> wrote:
> I attempted to send this yesterday, but used the wrong sender email > address and it got rejected. > > I think this is still relevent, just to confirm I understand the > proposal correctly. > > > ----- Forwarded message from Steven D'Aprano <steve+pyt...@pearwood.info> > ----- > > Date: Mon, 24 Aug 2020 11:46:02 +1000 > From: Steven D'Aprano <steve+pyt...@pearwood.info> > To: python-ideas@python.org > Subject: Re: [Python-ideas] PEP 472 - slices in keyword indices, d[x=1:3] > > On Sun, Aug 23, 2020 at 09:40:53PM -0400, Todd wrote: > > > I think it is worth directly discussing the availability of slices in PEP > > 472-style keyword indices, since we seem to have mostly converged on a > > dunder method signature. This is an issue that has been alluded to > > regarding keyword-based (labelled) indices but not directly addressed. > The > > basic syntax would be something like d[x=1:3]. > > I read that as equivalent to `d[x=slice(1, 3)]`. Is that your intention? > > If that is your intention, then a big +1. > Yes, this was my intention. The same as with current slices, just passed to the keyword argument. >
_______________________________________________ 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/SHL2QKEH6TV4AOY5E22N5GIQBZUDZ2ZS/ Code of Conduct: http://python.org/psf/codeofconduct/