Alexander Belopolsky <belopol...@users.sourceforge.net> added the comment:
I don't want to pollute python-dev with more hopeless ideas, but I wonder if itertools could grow an efficient C-implemented def first(collection): return next(iter(collection)) On the other hand, it probably belongs to recipes more than stdlib. This is not really an iterator tool after all. ---------- _______________________________________ 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