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