Raymond Hettinger <rhettin...@users.sourceforge.net> added the comment:
Use set.pop(). Or if you don't want mutation, then use next(iter(s)) or next(iter(s),default). This technique also works for any collection including dicts and deques and whatnot. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue7212> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com