1

Every post or article on __del__ warns about circular references and the fact that its execution is not guaranteed. But what are the dangers of using __del__ except non-guaranteed execution? For example:

  1. I want to write a __del__ method in a class to be called explicitly on its objects myobject.__del__(). Why is it a bad idea?
  2. What is the risk of multiple calls to myobject.__del__()?
Alex Pilkevych
  • 185
  • 1
  • 1
  • 8

0 Answers0