[issue14836] Add next(iter(o)) to set.pop, dict.popitem entries.

Éric Araujo report at bugs.python.org
Thu May 17 02:22:40 CEST 2012


Éric Araujo <merwok at netwok.org> added the comment:

> Use next(iter(s)) to return an arbitrary element
I would suggest s/return/get/

IIUC calling this twice in a row will get the same element; should the doc mention that?

----------
nosy: +eric.araujo

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue14836>
_______________________________________


More information about the Python-bugs-list mailing list