On 11/21/2014 09:16 AM, Steven D'Aprano wrote:
On Fri, Nov 21, 2014 at 08:52:59AM -0800, Ethan Furman wrote:
On 11/21/2014 08:30 AM, Steven D'Aprano wrote:
But generators and iterators *are the same thing*. (Generator functions are not iterators, but generators themselves are.) Iterators don't have a specific type, but they obey the iterator protocol:
Um, no, they aren't. One cannot 'send()' into any ol' iterator.
"Must not support send()" has never been part of the definition of iterators.
I suspect a language use issue: *are the same thing* implies to me a type check, not an isinstance check.