The python implementation of the "relationships between classes".

Jerry Zhang jerry.scofield at gmail.com
Thu Nov 10 20:43:33 EST 2011


2011/11/11 Chris Angelico <rosuav at gmail.com>

> On Fri, Nov 11, 2011 at 10:14 AM, Chris Kaynor <ckaynor at zindagigames.com>
> wrote:
> > Continuing this OT discussion, would it be a brain transplant, or a
> > full body transplant?
>
> It's just a rebinding. You don't move the body, you just bind your
> name to a new body. It's perfectly legal to have two names bound to
> one body (cf Dr Jekyll and Mr Hyde); if you murder Mr Hyde, you can
> still access the body through the other name.
>
> This is association, not aggregation or composition. You already realized
that there is difference between these relationship(depending on your
application requirement). and you are trying to tell me to code a
aggregation and the composition with the same code.



> ChrisA
> --
> http://mail.python.org/mailman/listinfo/python-list
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20111111/76df2234/attachment.html>


More information about the Python-list mailing list