[Python-ideas] Iteritems() function?

Masklinn masklinn at masklinn.net
Wed Jun 8 21:32:37 CEST 2011


On 2011-06-08, at 19:57 , Matt Billenstein wrote:
> On Wed, Jun 08, 2011 at 01:25:42PM +0200, Masklinn wrote:
>> You could just convert everything to a dict:
>> 
>>    for first, second in dict(some_items).iteritems():
>>        # etc?
> 
> That option won't necessarily preserve the order of the original sequence where
> perhaps it matters…
> 
That is what collections.OrderedDict is for.


More information about the Python-ideas mailing list