title: python getting object properties with __dict__
body: <p>Using py3, I have an object that uses the <code>@property</code> decorator</p>
  <pre><code>class O(object):
      def __init__(self):
          self._a = None
  
      @property
      def a(self):
          return 1
  </code></pre>
  <p>accessing the attribute a via <code>__dict__</code> (with <code>_a</code>) doesn't seem to return the property decorated value but the initialized value <code>None</code></p>
  <pre><code>o = O()
  print(o.a, o.__dict__['_a'])
  &gt;&gt;&gt; 1, None
  </code></pre>
  <p>Is there a generic way to make this work? I mostly need this for</p>
  <pre><code>def __str__(self):
      return ' '.join('{}: {}'.format(key, val) for key, val in self.__dict__.items())
  </code></pre>