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