[Python-ideas] PEP pre-draft: Support for indexing with keyword arguments

Ethan Furman ethan at stoneleaf.us
Thu Jul 3 01:40:39 CEST 2014


On 07/02/2014 04:10 PM, Tim Delaney wrote:
>
> I really do think that a[b=c, d=e] should just be syntax sugar for a['b':c, 'd':e]. It's simple to explain, and gives
> the greatest backwards compatibility. In particular, libraries that already abused slices in this way will just continue
> to work with the new syntax.

+0.5 for keywords in __getitem__

+1 for this version of it

~Ethan~


More information about the Python-ideas mailing list