[issue37974] zip() docstring should say 'iterator' instead of 'object with __next__()'
![](https://secure.gravatar.com/avatar/fa0f7819f1825f596b384c19aa7dcf33.jpg?s=120&d=mm&r=g)
New submission from Sergey Fedoseev <fedoseev.sergey@gmail.com>: In [3]: help(zip) class zip(object) | zip(*iterables) --> zip object | | Return a zip object whose .__next__() method returns a tuple where | the i-th element comes from the i-th iterable argument. The .__next__() | method continues until the shortest iterable in the argument sequence | is exhausted and then it raises StopIteration. This description is awkward and should use term 'iterator' as https://docs.python.org/3/library/functions.html#zip does. The same applies to chain(), count() and zip_longest() from itertools. ---------- assignee: docs@python components: Documentation messages: 350704 nosy: docs@python, sir-sigurd priority: normal severity: normal status: open title: zip() docstring should say 'iterator' instead of 'object with __next__()' _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue37974> _______________________________________
![](https://secure.gravatar.com/avatar/fa0f7819f1825f596b384c19aa7dcf33.jpg?s=120&d=mm&r=g)
Change by Karthikeyan Singaravelan <tir.karthi@gmail.com>: ---------- nosy: +rhettinger type: -> behavior _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue37974> _______________________________________
![](https://secure.gravatar.com/avatar/fa0f7819f1825f596b384c19aa7dcf33.jpg?s=120&d=mm&r=g)
Raymond Hettinger <raymond.hettinger@gmail.com> added the comment: This looks fine to me. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue37974> _______________________________________
participants (3)
-
Karthikeyan Singaravelan
-
Raymond Hettinger
-
Sergey Fedoseev