23 lines
305 B
Python
23 lines
305 B
Python
from dataclasses import dataclass
|
|
|
|
|
|
class a_place_on_earth(list): ...
|
|
|
|
|
|
@dataclass
|
|
class Dog:
|
|
name: str
|
|
|
|
def __del__(self):
|
|
global heaven
|
|
heaven.append(self)
|
|
|
|
|
|
heaven = a_place_on_earth()
|
|
|
|
if __name__ == "__main__":
|
|
Dog("Fido")
|
|
Dog("Rex")
|
|
Dog("Spot")
|
|
print(heaven)
|