class ABC(object): def __init__(self): pass def foo(self): print 'foo' def bar(self): print 'bar' a = ABC() >> getattr(a,'foo') foo >> getattr(a,'bar') bar
댓글 없음:
댓글 쓰기