On 4/28/07, Calvin Spealman <[EMAIL PROTECTED]> wrote:
> I'm just going to jump into this and voice a concern that allowing
> overriding of isinstance and issubclass seems like a Bad Idea.

I'm also uncomfortable, which is why I originally suggested a parallel
predicate.  That said, I can't put my finger on why it is wrong, so
I'm not certain that a parallel predicate (isa?) would be better.

Guido wrote:
> Note though that only the second argument to either function can
> overload the rules. IOW if you write isinstance(x, C), there is no way
> that x could attempt to lie; but C could.

As Barry pointed out, this means a class can't easily say "my parent
may well implement ABC, but I don't."  That special case could be
added to the default overriding behavior, but ... it starts to get
fragile.

-jJ
_______________________________________________
Python-3000 mailing list
Python-3000@python.org
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