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

Stephan Hoyer shoyer at gmail.com
Thu Jul 3 22:20:45 CEST 2014


On Thu, Jul 3, 2014 at 12:59 PM, Stefano Borini <
stefano.borini at ferrara.linux.it> wrote:

> So if you want to keep __getitem__ signature unchanged, you will have to
> map labels
> to positions manuallyi inside __getitem__, a potentially complex task. Not
> even
> strategy 3 (namedtuple) would solve this issue.
>

Yes, this is true. However, in practice many implementations of labeled
arrays would have generic labeled axes, so they would need to use their own
logic to do the mapping in __getitem__ anyways.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20140703/273316d5/attachment.html>


More information about the Python-ideas mailing list