title: Difference between __attrName, attrName in python classes?
body: <p>I am trying to understand the difference between the class attributes __value and value in below python class.</p>
  
  <pre><code>class WithClass ():
      def __init__(self, val = "Bob"):
          self.__value = val
      def my_func(self):
          print(self.value)
  a = WithClass()
  print(a.__value)
  b = WithClass("Sally")
  print(b.__value))
  </code></pre>
  
  <p>Above code gives error "AttributeError: WithClass instance has no attribute '__value'". But below code does not give any error. </p>
  
  <pre><code>class WithClass ():
      def __init__(self, val = "Bob"):
          self.value = val
      def my_func(self):
          print(self.value)
  a = WithClass()
  print(a.value)
  b = WithClass("Sally")
  print(b.value))
  </code></pre>
  
  <p>What is the difference between the declaration of two attributes? Any resources to understanding the importance of "__" in python would be appreciated.</p>