[Python-ideas] Consider making enumerate a sequence if its argument is a sequence
Akira Li
4kir4.1i at gmail.com
Thu Oct 1 02:28:13 CEST 2015
Andrew Barnert via Python-ideas
<python-ideas at python.org> writes:
...
> (The fact that we don't have a term for "non-iterator iterable", and
All iterators are iterable but some iterables are not iterators.
If your code accepts only iterators then use the term *iterator*.
Otherwise the term *iterable* could be used.
It is misleading to use *iterable* if your code only accepts iterators.
If an iterable is an iterator; It is called *iterator*. The term
*iterable* implies that some instances are not iterators.
More information about the Python-ideas
mailing list