Python __delete__() Magic Method
Python’s magic method __delete__() is called to delete an instance’s attribute. For example, the expression del my_obj.attr would result in attr.__delete__(my_obj), so you’d give the attribute itself the responsibility for its deletion on my_obj. We call this a “Dunder Method” for “Double Underscore Method” (also called “magic method”). To get a list of all dunder … Read more