"Francis Girard" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > An ""iteratable"" class is a class supporting the __iter__ method which > should > return an ""iterator"" instance, that is, an instance of a class > supporting > the "next" method.
Not quite right, see below. > An iteratable, strictly speaking, doesn't have to support the "next" > method An iterable with a next method is, usually, an iterator. > an "iterator" doesn't have to support the "__iter__" method Yes it does. iter(iterator) is iterator is part of the iterater protocol for the very reason you noticed... >(but this breaks the iteration protocol as we will later see). Iterators are a subgroup of iterables. Being able to say iter(it) without having to worry about whether 'it' is just an iterable or already an iterator is one of the nice features of the new iteration design. Terry J. Reedy -- http://mail.python.org/mailman/listinfo/python-list