Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

FOIC question, EXPERT LEVEL How to alter mro in runtime?

Name: Anonymous 2015-05-03 22:45

Impl(object):
def __init__(self):
pass
def shit(self):
pass

StdoutImpl(Impl):
def shit(self):
print("A shit has been shat.")

StderrImpl(Impl):
def shit(self):
__import__("sys").stderr.write("A shit has been shat to stderr.\n")

class MyApplicationg(object):
def __init__(self, implname):
if implname == "stderr":
magic(StderrImpl, self)
else:
magic(StdoutImpl, self)

def magic(cls, object):
# ?????????????
# ????????????????
# ?????????
pass

Name: Anonymous 2015-05-04 14:31

>>1
>>2
>>3
>>4
>>5
>>6
If it ain't LISP, it's crap.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List