I think this comparison is unfair.

> d.items()[0]    vs    list(d.items())[0]

Should be compared with `next(iter(d.items())`

> d.keys()[-1]     vs      list(d.keys())[-1]

Should be compared with `next(reversed(d.keys()))`, or `next(reversed(d))`.

> random.choice(d.items())   vs    random.choice(list(d.items()))

Should be compared with `random.choice(items_list)` with `items_list =
list(d.items())` setup too.

-- 
Inada Naoki  <[email protected]>
_______________________________________________
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/73YTQDLWN6SUSOZ62C23SFHK3FIJGY3Y/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to