title: Python - Access object attributes as in a dictionary
body: <pre><code>&gt;&gt;&gt; my_object.name = 'stuff'
  &gt;&gt;&gt; my_str = 'name'
  &gt;&gt;&gt; my_object[my_str] # won't work because it's not a dictionary :)
  </code></pre>
  
  <p>How can I access to the fields of <code>my_object</code> defined on <code>my_str</code> ?</p>