You need to self:
self.__private()
Classes in python get used to it if you come with C # / C ++ / Java, as if it looks like you. This probably destroys the “pythonic” way of formulating things, but you can think of it this way (it helped me):
, self , . "Private" , , self.__private().
, , , . python, , , .
, self . (, ) , , . :
def __private(randomText):
print "Hey man! This is private!"
def public(otherRandomText):
otherRandomText.__private()
print "I don't care if you see this!"
, , . (self ).
pythonistas / ?