On 5/10/06, Bill Janssen <[EMAIL PROTECTED]> wrote:

> > It only lets you inherit behaviour to new subclasses

> Not that it matters, but...  Yes, that's right.  In systems like
> these, that's how you "add functionality to already existing classes";
> you mix them with the new functionality into a new type.

The problem with this is that

(1)  Existing objects already have a class, so you can't add behavior
to old objects.
(2)  Existing factories put out the old class, so you can't add
behavior to new objects.

For instance, it is theoretically possible to create an object whose
__dict__ is a subclass of dict.  In practice, it isn't so easy.  (2.5
changed the implementation of dict itself to support this, and I'm
still not sure how to actually do it cleanly.)

-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