[Tutor] Aggregation vs Composition

2017-12-10 Thread jia yue Kee
Good Day All, I am new to Python and I came across the concept of Composition and Aggregation the other day in Dusty Philips's Python 3: Object-Oriented Programming book. Based on my reading, what I gathered was that Composition implies a relationship where the child cannot exist independent of t

Re: [Tutor] Python __del__ method

2017-07-12 Thread Jia Yue Kee
Hi Eryk, Thanks for the detailed explanation given. I think I got it now. :) Regards, JY -Original Message- From: eryk sun [mailto:eryk...@gmail.com] Sent: Wednesday, July 12, 2017 8:13 AM To: tutor@python.org Cc: Jia Yue Kee Subject: Re: [Tutor] Python __del__ method On Wed, Jul 12

[Tutor] Python __del__ method

2017-07-11 Thread Jia Yue Kee
Hi All, I am new to Python and I came across the Python __del__ method the other day and I have some doubts on the output of the following code. So, the snippet code goes something like this: class Robot(): def __init__(self, name): print(name + " has been created!") def __del