title: Python string to attribute
body: <p>How can I achieve such job:</p>
  
  <pre><code>def get_foo(someobject, foostring):
      return someobject.foostring
  </code></pre>
  
  <p>IE:</p>
  
  <p>if I do <code>get_foo(obj, "name")</code> it should be calling <code>obj.name</code> (see input as string but I call it as an attritube.</p>
  
  <p>Thanks</p>