[Python-ideas] `OrderedDict.items().__getitem__`

Mark Lawrence breamoreboy at yahoo.co.uk
Sat Jan 11 16:55:19 CET 2014


On 11/01/2014 14:18, Ram Rachum wrote:
> I think that `OrderedDict.items().__getitem__` should be implemented, to
> solve this ugliness:
>
> http://stackoverflow.com/questions/21062781/shortest-way-to-get-first-item-of-ordereddict-in-python-3
>
> What do you think?
>
> Thanks,
> Ram.
>

Use the more_itertools first function.

-- 
My fellow Pythonistas, ask not what our language can do for you, ask 
what you can do for our language.

Mark Lawrence



More information about the Python-ideas mailing list