Files
heaven/heaven.py

34 lines
565 B
Python

from contextlib import suppress
from dataclasses import dataclass
class a_place_on_earth(list):
def __del__(self):
global heaven
heaven = self
def __bool__(self):
return self == []
def god_is_a_girl():
raise GenderException("No zhe isn't")
@dataclass
class Dog:
name: str
def __del__(self):
global heaven
heaven.append(self)
with suppress(NameError):
heaven = a_place_on_earth() and god_is_a_girl()
if __name__ == "__main__":
Dog("Fido")
Dog("Rex")
Dog("Spot")
print(heaven)