Last active
January 18, 2018 15:01
-
-
Save gulducat/002ee89b30d14beef166b6351cbb32e3 to your computer and use it in GitHub Desktop.
You know how most classes do helpful things? This is the opposite of that.
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
#!/usr/bin/env python | |
# vim: ts=8 et sw=4 sts=4 | |
from __future__ import print_function | |
import random, time # pep8? blah. | |
def pause_for_dramatic_effect(*a): | |
time.sleep(random.choice(list(range(3,5)))) | |
class Blaher: # one who actively does not give a fuck. | |
@classmethod # classy tho. | |
def summon(cls): # if anyone should dare.. | |
pause_for_dramatic_effect() # make em wait. | |
cls._mumble('I am Blaher.') | |
pause_for_dramatic_effect() | |
cls._mumble('ugh why have you done this.') | |
return Blaher(please='pretty') | |
def __init__(self, please=False): | |
if not please: # they must ask nicely. | |
raise Please # fuck em. | |
# start thrusters, engage sarcasm engine. | |
pause_for_dramatic_effect() # let em stew. | |
@staticmethod # always and forever. | |
def _mumble(msg): | |
print('B: %s' % msg) | |
def __getattr__(self, name): # no matter what they do, | |
def getem(*a, **kw): # i'm gonna get 'em good. | |
# gonna shove their stupid requests | |
# right back in their stupid faces. | |
ak = ' '.join( # gonna undermine | |
# their arguments | |
[str(x) for x in a] + ['%s %s' % (k, v) for k, v in kw.items()] | |
) | |
# with a sick comeback. | |
pause_for_dramatic_effect() | |
# lay it on thhiiiiick. | |
self._mumble('%s? %s? blah.' % (name, ak)) | |
pause_for_dramatic_effect() | |
return Blaher(please='follow the chain of command.') | |
return getem # blow up in their face! | |
def dismiss(self, *a, **kw): | |
pause_for_dramatic_effect(99999) # this number does nothing. | |
self._mumble('oh i can go now? great.') # classic Blaher. | |
pause_for_dramatic_effect(9) # neither does this one. | |
self._evaporate() | |
def _evaporate(self): | |
# stop being self-referential. | |
del self # pretend to delete self. | |
if __name__ == '__main__': | |
print('summoning a Blaher.') | |
b = Blaher.summon() | |
print('asking it for the thing') | |
thing_getter = b.getter() | |
the_thing = thing_getter.get('u no the one') | |
print('asking it to have a better attitude') | |
b.dont_blah_so_much('pls k thx') | |
# ok it doesn't want to do anything we want it to do. | |
# how can we fuck with it? | |
print('maybe sarcasm will work') | |
b.shouldifuckmyself('yes. yes i should. ', you='right') | |
print('hahahhahahah') | |
getattr(b, 'sing a song')( | |
'ok!' | |
'\n im such a pretty pretty bunny bunny' | |
'\n singing such a pretty pretty' | |
'\n song on such a sunny sunny' | |
'\n super duper most fantastic' | |
'\n awesome possum cytoplastic' | |
'\n so much fun it might be spastic' | |
'\n hippy flippy gigantospasmic' | |
'\n pretty pretty pretty pretty' | |
'\n pretty pretty daaaaayyyyyyyy' | |
'\n' | |
) | |
b.stop_being_self_referential() | |
b.dismiss() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Please change
the_thing = thing_getter.get('u no the one')
to "I think you no da wei"