class cls: def f(self, a, b): print a+b __p=12 obj=cls() fun=obj.f print fun.im_self._cls__p 12 I need that '__p' exactly be private.