<div style="color: rgb(34, 34, 34); font-family: arial, sans-serif; font-size: 14px; background-color: rgba(255, 255, 255, 0.917969); ">A general description of my issue.</div><div style="color: rgb(34, 34, 34); font-family: arial, sans-serif; font-size: 14px; background-color: rgba(255, 255, 255, 0.917969); ">
<br></div><div style="color: rgb(34, 34, 34); font-family: arial, sans-serif; font-size: 14px; background-color: rgba(255, 255, 255, 0.917969); ">To my understand, python's feature such as "name-reference-object" and "garbage collection" system did some of work for you, it makes your life easier, but you still need to add your explicit application in your code.</div>
<div style="color: rgb(34, 34, 34); font-family: arial, sans-serif; font-size: 14px; background-color: rgba(255, 255, 255, 0.917969); "><br></div><div style="color: rgb(34, 34, 34); font-family: arial, sans-serif; font-size: 14px; background-color: rgba(255, 255, 255, 0.917969); ">
For example, </div><div style="color: rgb(34, 34, 34); font-family: arial, sans-serif; font-size: 14px; background-color: rgba(255, 255, 255, 0.917969); ">Composition implementation: you may need to do 5 job with C++, but only 2 job with python, the other 3 job is done by python implicitly.</div>
<div style="color: rgb(34, 34, 34); font-family: arial, sans-serif; font-size: 14px; background-color: rgba(255, 255, 255, 0.917969); ">association implementation: You need 3 job with C++, but 1 with python. it seems python's object's lifecycle handling has reached this level, all you should do is just "associating and de-association".</div>
<div style="color: rgb(34, 34, 34); font-family: arial, sans-serif; font-size: 14px; background-color: rgba(255, 255, 255, 0.917969); "><br></div><div style="color: rgb(34, 34, 34); font-family: arial, sans-serif; font-size: 14px; background-color: rgba(255, 255, 255, 0.917969); ">
Here is exactly of my question, for composition,</div><div style="color: rgb(34, 34, 34); font-family: arial, sans-serif; font-size: 14px; background-color: rgba(255, 255, 255, 0.917969); "> the best code may be you do 2 job explicitly, 3 job done by python implicitly.</div>
<div style="color: rgb(34, 34, 34); font-family: arial, sans-serif; font-size: 14px; background-color: rgba(255, 255, 255, 0.917969); ">Code_Zero. 1 job(by you) + 4(by python) does NOT work.</div><div style="color: rgb(34, 34, 34); font-family: arial, sans-serif; font-size: 14px; background-color: rgba(255, 255, 255, 0.917969); ">
Code_one. 2 job(by you) + 3(by python) works. That is the best one.</div><div style="color: rgb(34, 34, 34); font-family: arial, sans-serif; font-size: 14px; background-color: rgba(255, 255, 255, 0.917969); ">Code_two. 3 job( by you) + 2 (by python) works too,</div>
<div style="color: rgb(34, 34, 34); font-family: arial, sans-serif; font-size: 14px; background-color: rgba(255, 255, 255, 0.917969); ">Code_three. 4 job(by you) + 1(by python) works too.</div><div style="color: rgb(34, 34, 34); font-family: arial, sans-serif; font-size: 14px; background-color: rgba(255, 255, 255, 0.917969); ">
<br></div><div style="color: rgb(34, 34, 34); font-family: arial, sans-serif; font-size: 14px; background-color: rgba(255, 255, 255, 0.917969); ">Since i am not familiar with python yet, my code most likely would gets into Code_two or Code_three(Code_Zero is also possible for new guys like me), though they also work, they are bad code.</div>
<div style="color: rgb(34, 34, 34); font-family: arial, sans-serif; font-size: 14px; background-color: rgba(255, 255, 255, 0.917969); ">What i am looking for is the Code_one example, i thought many OOP application designer may have met this issue, so a good Code_one reference is the best choice to start this project.</div>
<br><div class="gmail_quote">2011/11/11 Jerry Zhang <span dir="ltr"><<a href="mailto:jerry.scofield@gmail.com">jerry.scofield@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br><br><div class="gmail_quote"><div class="im">2011/11/11 Chris Angelico <span dir="ltr"><<a href="mailto:rosuav@gmail.com" target="_blank">rosuav@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div>On Fri, Nov 11, 2011 at 10:14 AM, Chris Kaynor <<a href="mailto:ckaynor@zindagigames.com" target="_blank">ckaynor@zindagigames.com</a>> wrote:<br>
> Continuing this OT discussion, would it be a brain transplant, or a<br>
> full body transplant?<br>
<br>
</div>It's just a rebinding. You don't move the body, you just bind your<br>
name to a new body. It's perfectly legal to have two names bound to<br>
one body (cf Dr Jekyll and Mr Hyde); if you murder Mr Hyde, you can<br>
still access the body through the other name.<br><br></blockquote></div><div>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.</div>

<div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
ChrisA<span class="HOEnZb"><font color="#888888"><br>
<span><font color="#888888">--<br>
<a href="http://mail.python.org/mailman/listinfo/python-list" target="_blank">http://mail.python.org/mailman/listinfo/python-list</a><br>
</font></span></font></span></blockquote></div><br>
</blockquote></div><br>