On Thu, Nov 5, 2009 at 3:43 PM, Chris Bergstresser <ch...@subtlety.com> wrote: > .. and "x = iter(s).next()" raises a StopIteration > exception.
And that's why the documented recipe should probably recommend next(iter(s), default) instead. Especially because iter(s).next() is not even valid code in 3.0. _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com