heaven/heaven.py

34 lines
565 B
Python
Raw Normal View History

2025-04-22 22:21:54 -07:00
from contextlib import suppress
from dataclasses import dataclass
2025-04-22 22:21:54 -07:00
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")
2025-04-22 22:19:14 -07:00
@dataclass
2025-04-22 22:13:01 -07:00
class Dog:
name: str
2025-04-22 22:13:01 -07:00
def __del__(self):
global heaven
heaven.append(self)
2025-04-22 22:21:54 -07:00
with suppress(NameError):
heaven = a_place_on_earth() and god_is_a_girl()
if __name__ == "__main__":
Dog("Fido")
Dog("Rex")
Dog("Spot")
print(heaven)