3 ms·
Look, ma, dots! >>> def Cat(name): def hello(): print "I'm "+name hello.__dict__ = { 'hello': hello, } re
by icebraining 12y ago
Look, ma, dots!
>>> def Cat(name):
def hello():
print "I'm "+name
hello.__dict__ = {
'hello': hello,
}
return hello
>>> c = Cat('snuffels')
>>> c.hello()
I'm snuffels