Toggle navigation
Home
Latest pastes
FAQ
Random
BitBin is shutting down!
Register
Login
Untitled
SUBMITTED BY:
Guest
DATE:
March 5, 2015, 7:20 a.m.
FORMAT:
Text only
SIZE:
558 Bytes
Raw
Download
Tweet
HITS:
652
Go to comments
Report
def __init__(self, insert_object):
self.insert_object = insert_object
def ask(self, *args):
if args[0][:7] != 'please':
return 'You must learn to say please first.'
if not callable(getattr(insert_object, args[0][7:], None)):
return 'Thanks for asking, but I know not how to ' + args[0][7:]
if len(args) == 2:
return eval('insert_object.' + args[0][7:] + str(args[1:])[:-2] + ')')
return eval('insert_object.' + args[0][7:] + str(args[1:]))
Please enable JavaScript to view the
comments powered by Disqus.
comments powered by
Disqus