title: Accessing private class variable
body: <p>While learning Python, I came accross this strange behavior :</p>
  
  <p>Consider this simple class :</p>
  
  <pre><code>class Human(object):
    def __init__(self, name):
      self.__name = name
  
    def description(self):
      print("Hello, my name is %s" % self.__name)
  </code></pre>
  
  <p>I want to avoid being able to alter the name after the object has been created.</p>
  
  <p>If I use this :</p>
  
  <pre><code>MyHuman = Human("Andy")
  MyHuman.__name = "Arthur"
  MyHuman.age = 23
  
  MyHuman.description()
  print MyHuman.age
  </code></pre>
  
  <p>It doesn't change the name after the object instanciation, which is good because I want the instance variable to be private. On the other hand, I thought it would complain about accessing this variable. It doesn't even complain about accessing a mysterious "age" variable and prints it properly later.</p>
  
  <p>I come from C# and it seems odd to me. Where is my mistake ?</p>