#!/usr/local/bin/python2 class C: def f(self): pass c = C() c.f.__func__.__name__ print c.f.__name__, c