__del__ magic method dangers in Python 2 and infinite loops
Yesterday I've stumbled upon a very surprising bug in some Python 2 code, related to the use of the __del__ method in a vendor library we employ at work. Here is some minimal code that reproduces the issue I met: class MyClass: def __init__(self): raise RuntimeError('Woops') def __del__ …
Read More