Guido van Rossum wrote:
> On 4/28/07, Samuele Pedroni <[EMAIL PROTECTED]> wrote:
>> Shouldn't the various *View in abc.py be Iterables (inherit from 
>> Iterable) ?
>
> Oops, it looks like this is a mess. There are two classes
> _MappingView. Ignore them for the sake of the PEP. I'll clean them up
> later. We probably need fewer mapping classes, nor more...
>
It seems that something that defines __iter__ should also subclass Iterable,
in this kind of situation where the special method is unique enough it seems
quite repetitive to have to do both. It seems easy to forget to subclass.

Shouldn't now that there are isinstance hooks Iterable be defined again 
in terms
of just checking for the presence of '__iter__' lookup-wise?  I suppose 
there are some other similar
cases, of course in other situations the ABC carry an intention that 
goes beyond the presence
of methods.


_______________________________________________
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