Re: [Tutor] The python implementation of the "class relationship".

2011-11-11 Thread Alan Gauld
On 11/11/11 02:39, Jerry Zhang wrote: 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. association implementation: You need 3 job with C++, but 1 with python. it seems python's object's lifecycle handling has

Re: [Tutor] The python implementation of the "class relationship".

2011-11-10 Thread Jerry Zhang
2011/11/11 Alan Gauld > On 10/11/11 09:23, Jerry Zhang wrote: > >> As you know, there are several kinds of relationships between classes in >> the UML -- dependency, association, aggregation, composition. >> > > There are several more besides, but lets not get carried away... :-) > > > Q1. Is th

Re: [Tutor] The python implementation of the "class relationship".

2011-11-10 Thread Alan Gauld
On 10/11/11 09:23, Jerry Zhang wrote: As you know, there are several kinds of relationships between classes in the UML -- dependency, association, aggregation, composition. There are several more besides, but lets not get carried away... :-) Q1. Is there any article or code example on its imp

Re: [Tutor] The python implementation of the "class relationship".

2011-11-10 Thread Jerry Zhang
Thanks for your reply. 2011/11/10 Steven D'Aprano > Jerry Zhang wrote: > >> As you know, there are several kinds of relationships between classes in >> the UML -- dependency, association, aggregation, composition. >> > > "As you know"... no, I'm afraid I don't know. Believe it or not, it is > po

Re: [Tutor] The python implementation of the "class relationship".

2011-11-10 Thread Steven D'Aprano
Jerry Zhang wrote: As you know, there are several kinds of relationships between classes in the UML -- dependency, association, aggregation, composition. "As you know"... no, I'm afraid I don't know. Believe it or not, it is possible to be an experienced, good programmer and still know nothing

[Tutor] The python implementation of the "class relationship".

2011-11-10 Thread Jerry Zhang
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. More specific, in composition model, the container object may be responsible for the h