The python implementation of the "relationships between classes".

Jerry Zhang jerry.scofield at gmail.com
Thu Nov 10 08:15:39 EST 2011


Greetings:

As you know, there are several kinds of relationships between classes in
the UML -- dependency, association, aggregation, composition.
Q1. Is there any article or code example on its implementation in python?
Q2. For example, in composition model, the container object may be
responsible for the handling of embedded objects' lifecycle. What is the
python pattern of such implementation?
would it be adding __del__ to the container class to del embedded objects
or something else?

Thanks!
Biao
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20111110/fc0ddc6d/attachment.html>


More information about the Python-list mailing list