__getattribute__

Daniel Schüle uval at rz.uni-karlsruhe.de
Sun Jul 11 19:49:28 EDT 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