On 5/15/07, Collin Winter <[EMAIL PROTECTED]> wrote:
> This is what I don't understand: ABCs require changing the VM, roles
> don't; all that change buys you is the ability to spell "performs()"
> as "isinstance()". Why are ABCs preferable, again?

Actually, if you didn't care about overloading isinstance(), you could
have everything else in PEP 3119 by using a different spelling than
isinstance(). Suppose the playing field were to be leveled like this
-- IMO ABCs would still be preferable because they can *also* be
subclassed directly and provide concrete or partially-implemented
methods, acting as mix-in classes. You can also turn it around. If
Roles were overloading isinstance() -- how would they be better than
ABCs?

But I *like* overloading isinstance(), because it means there's less
to learn, and so does Phillip -- it means there can be a uniform way
for the GF machinery to talk about the relationships between instances
and the various things that can be used as argument annotations (even
zope.interfaces could overload isinstance() to do the right thing).

-- 
--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

Reply via email to