我注意到Python2.6在它的全局函数列表中添加了next().
Run Code Online (Sandbox Code Playgroud)Retrieve the next item from the iterator by calling its next() method.如果
default给定,则在迭代器耗尽时返回,否则StopIteration引发.
添加这个的动机是什么?你能做什么next(iterator),你不能做什么iterator.next()和一个except条款来处理StopIteration?