Created
May 4, 2020 22:32
-
-
Save AndrewOwenMartin/3a8d3754056e0441831260fc10aa0e6e to your computer and use it in GitHub Desktop.
Poison in Python
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import random | |
class Poison: | |
_artist = "Alice Cooper" | |
_album = "Trash" | |
_released = 1989 | |
class Her(Poison): | |
def __init__(self): | |
# Your cruel device | |
self.device = Device("cruel") | |
# Your blood, like ice | |
self.blood = Blood(celcius=0) | |
# One look, | |
def look(self, him): | |
# Could kill | |
if random.random() > 0.666: | |
him.kill() | |
# My pain, your thrill | |
self.thrill = him.pain | |
class AliceCooper: | |
def __init__(self, her): | |
# I want | |
try: | |
# to love you | |
self.love(her) | |
# But I better not touch | |
except TouchError: | |
print("Don't touch!") | |
# I want to hold you but my senses tell me to stop. | |
while all(sense.is_safe for sense in self.senses): | |
self.hold(her) | |
# I want to kiss you | |
if self.kiss_desire > 0: | |
# but I want it too much | |
if self.kiss_desire < Alice.MAX_KISS_DESIRE: | |
self.kiss(her) | |
else: | |
raise ValueError("Too much!") | |
# I want to taste you but your lips are venemous poison | |
if not her.lips.venemous_poison: | |
self.taste(her) | |
else: | |
# Your poison running through my veins | |
assert any([x.is_poison for x in self.veins]) | |
# You're poison | |
assert Poison in her.__class__.__bases__ | |
# I don't wanna break these chains | |
for chain in itertools.chain(*her.chains): | |
if False: | |
break |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment