Suggestion: make sequence and map interfaces more similar
Marko Rauhamaa
marko at pacujo.net
Thu Mar 31 10:19:33 EDT 2016
Jussi Piitulainen <jussi.piitulainen at helsinki.fi>:
> operator.itemgetter(*selector)(fields) # ==> ('y', 'y', 'x')
>
> [...]
>
> operator.itemgetter(*selector)(field_dict) # ==> ('y', 'y', 'x')
>
> It's not quite the same but it's close and it works the same for
> strings, lists, dicts, ...
Not quite the same, but nicely found anyway.
Marko
More information about the Python-list
mailing list