[docs] [issue37974] zip() docstring should say 'iterator' instead of 'object with __next__()'

Sergey Fedoseev report at bugs.python.org
Wed Aug 28 23:30:45 EDT 2019


New submission from Sergey Fedoseev <fedoseev.sergey at 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 at python
components: Documentation
messages: 350704
nosy: docs at python, sir-sigurd
priority: normal
severity: normal
status: open
title: zip() docstring should say 'iterator' instead of 'object with __next__()'

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue37974>
_______________________________________


More information about the docs mailing list