title: Use str.format() to access object attributes
body: <p>I have a Python object with attributes <code>a</code>, <code>b</code>, <code>c</code>.</p>
  
  <p>I still use old string formatting, so I'd normally print these manually:</p>
  
  <pre><code> print 'My object has strings a=%s, b=%s, c=%s' % (obj.a, obj.b, obj.c)
  </code></pre>
  
  <p>Lately, my strings have been getting super long, and I'd much rather be able to simply pass the object into a string format function, something like:</p>
  
  <pre><code> print 'My object has strings a=%a, b=%b, c=%c'.format(obj)
  </code></pre>
  
  <p>However, the syntax is incorrect.  Is this possible?</p>