[issue40579] Second argument to iterator.next not described

2020-05-22 Thread Raymond Hettinger
Change by Raymond Hettinger : -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker ___ ___ Pyt

[issue40579] Second argument to iterator.next not described

2020-05-22 Thread Rahul Kumaresan
Change by Rahul Kumaresan : -- nosy: +rahul-kumi ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail

[issue40579] Second argument to iterator.next not described

2020-05-09 Thread Raymond Hettinger
Raymond Hettinger added the comment: The next() function has a different signature than the __next__() method. The former takes one or two arguments. That latter only takes one. >>> it = iter('abcde') >>> next(it) 'a' >>> next(it, 'default') 'b' >>> it.__next__()

[issue40579] Second argument to iterator.next not described

2020-05-09 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: It's documented here: https://docs.python.org/3/library/functions.html#next -- nosy: +remi.lapeyre ___ Python tracker ___ __

[issue40579] Second argument to iterator.next not described

2020-05-09 Thread Andrew Black
New submission from Andrew Black : The documentation for the built-in function next (which calls the __next__ method on an iterator) discusses its behavior when the iterator is exhausted. It talks about the StopIteration exception. However, it does not say anything about calling next with two