Class with private data members. : private « Class « Python Tutorial






class PrivateClass:
   def __init__( self ):
      self.publicData = "public"      # public data member
      self.__privateData = "private"  # private data member








11.24.private
11.24.1.Class with private data members.
11.24.2.Demonstrates private variables and methods
11.24.3.Private Variables
11.24.4.Emulating Privacy for Instance Attributes