Python __del__() Magic Method
Python’s magic method __del__() is called the finalizer method or, wrongly, the destructor method — the latter being wrong because it doesn’t actually destroy the object. Python calls __del__() upon deletion of a given instance. For example, the expression del my_obj will eventually initiate my_obj.__del__(). We call this a “Dunder Method” for “Double Underscore Method” … Read more