Ernest Friedman-Hill wrote:An instance of Sub contains an instance of A, like a mango contains a pit. They're not separate objects.
Please be more specific if you don't mind --
1. So there is only ONE object got created, right ?
2. What do you mean "object of Sub contains an instance of A" ? A is not a class variable of Sub, how does it "contain" ? Does "sub" object contain a reference to "A" ? wait, since there is not a separate object creatd for A, there should not be such reference at all. So what do you mean by "contain an instance of A". Please help clarify.
Thanks.