George Sakkis <george.sakkis <at> gmail.com> writes:
...
> As for the duck typing, I mentioned already that nobody forces you to
> extend this type to make some class an iterator, as nobody forces you
> to extend dict or dictmixin to write a user-defined mapping. You may
> well start from scratch implementing just next(); if you don't plan to
> use "+", "*" or any of the itertools operations on this type,
> extending Iter is useless. If you do plan to provide these operations
> though, you may either write them from scratch every time, or extend
> Iter.
> 

Unfortunately, an iterator that only defines next() will not be
compatible with the functions that would take advantage of
your proposal.

_______________________________________________
Python-3000 mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com

Reply via email to