[Tutor] Question about the object.__del__(self) method

2019-04-22 Thread Arup Rakshit
Consider the below in simple class: class RandomKlass: def __init__(self, x): self.x = x def __del__(self): print("Deleted…") Now when I delete the object created from RandomKlass using `del` operator I see the output “Deleted…”. That means `del` operator calls the _

Re: [Tutor] Question about the object.__del__(self) method

2019-04-22 Thread Alan Gauld via Tutor
On 22/04/2019 10:18, Arup Rakshit wrote: > Consider the below in simple class: > > class RandomKlass: > def __init__(self, x): > self.x = x > > def __del__(self): > print("Deleted…") > > Now when I delete the object created from RandomKlass using `del` operator I > s

Re: [Tutor] Question about the object.__del__(self) method

2019-04-22 Thread Arup Rakshit
On 22/04/19 3:35 PM, Alan Gauld via Tutor wrote: On 22/04/2019 10:18, Arup Rakshit wrote: Consider the below in simple class: class RandomKlass: def __init__(self, x): self.x = x def __del__(self): print("Deleted…") Now when I delete the object created from R