On Sat, Aug 15, 2020 at 08:26:10PM -0700, Guido van Rossum wrote:
> Are you saying that for xarray it is important to distinguish between
> `d[day=3, detector=4]` and `d[detector=4, day=3]`? If we just passed the
> keyword args to `__getitem__` as an extra `**kwds` argument (which
> preserves order, since Python 3.6 at least), that should work, right? If
> not, can you clarify?
Just to clarify here, I assume you mean that if xarray cares about
order-preserving keywords, they should write their methods this way:
def __getitem__(self, index=None, **kwargs):
rather than mandating that keyword args are *always* bundled into a
single dict parameter.
--
Steven
_______________________________________________
Python-ideas mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at
https://mail.python.org/archives/list/[email protected]/message/DV5QYK2XC3RGZV2GDH4J4HJXRNS4PIZH/
Code of Conduct: http://python.org/psf/codeofconduct/