On Mon, Mar 16, 2015 at 6:12 PM, Marko Rauhamaa <ma...@pacujo.net> wrote:
>
> I was actually referring to the offered API. It still seems to me like
> all iterators could offer close(), send() and throw(). Why? To make all
> iterators drop-in replacements of each other.
>
> Then, you could also stop wondering what to call the thingy returned by
> a generator. Why, it would be an iterator. You wouldn't then have any
> other use for a generator than the function that returns an iterator.

That just adds unnecessary overhead to every iterator. Also, what
happens when you throw something into iter([1,2,3]) ? Or send it a
value? What happens?

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to