Skip to content

Instantly share code, notes, and snippets.

@ahupp
Created August 22, 2020 21:15
Show Gist options
  • Save ahupp/7924bcebed149e176d4a0ed57afdce4b to your computer and use it in GitHub Desktop.
Save ahupp/7924bcebed149e176d4a0ed57afdce4b to your computer and use it in GitHub Desktop.
Python 3.8.3 (default, May 14 2020, 11:03:12)
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> class A:
... def __init__(self):
... print("A.__init__")
... raise Exception()
... def __del__(self):
... print("A.__del__")
...
>>> a = A()
A.__init__
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "<stdin>", line 4, in __init__
Exception
>>> b = A()
A.__init__
A.__del__
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "<stdin>", line 4, in __init__
Exception
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment