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  <songofaca...@gmail.com>
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/73YTQDLWN6SUSOZ62C23SFHK3FIJGY3Y/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to