Terry J. Reedy added the comment:

Briefly,
An iterable is an object that can be iterated with an iterator.
An iterator is an iterable that responds to next() calls, including the 
implicit calls in a for statement.
A generator is an iterator created by a generator function, which is a function 
with a yield keyword in its body.
A sequence is an iterable with minimal sequence methods.

The four terms are all in the glossary. The entry for iterable already points 
to the other three. What do you think is missing?

A range (as documented) is an immutable sequence.

----------
nosy: +terry.reedy

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue17887>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to