diff --git a/heaven.py b/heaven.py index 04533b2..5ccafff 100644 --- a/heaven.py +++ b/heaven.py @@ -1,6 +1,19 @@ +from dataclasses import dataclass + + +@dataclass class Dog: + name: str + def __del__(self): global heaven heaven.append(self) + heaven = [] + +if __name__ == "__main__": + Dog("Fido") + Dog("Rex") + Dog("Spot") + print(heaven)