privacy in Python

Ens ens_z at yahoo.com
Wed Aug 29 16:10:42 CEST 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