privacy in Python

Ens ens_z at yahoo.com
Wed Aug 29 10:10:42 EDT 2001


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.



More information about the Python-list mailing list