__getattribute__

Daniel Schüle uval at rz.uni-karlsruhe.de
Mon Jul 12 01:49:28 CEST 2004


Hello NG

is this kind of usage possible for classes
l = [1, 2, 3, 1]
l.__getattribute__("count")(1)

for example
f = foo()

def bar(t, m, p):
        t.__getattribute__(m)(p)


regards

Daniel



More information about the Python-list mailing list