On 4/29/07, Jim Jewett <[EMAIL PROTECTED]> wrote: > 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.
That use case is very questionable, and I see it more as an anti-pattern; I suspect that it's a case of inheriting implementation where you really ought to be using containment instead of subclassing. It's why I'm uncomfortable with string.Template inheriting from a string type, and and ditto for the OO os.path proposals that have the path object inherit from a string type (I know not all of them do). -- --Guido van Rossum (home page: http://www.python.org/~guido/) _______________________________________________ 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