title: How to use a dot in Python format strings?
body: <p>I want to format a string and be able to use the dot operator, so that I can construct template strings containing e.g. <code>{user.name}</code>, <code>{product.price}</code>.</p>
  
  <p>I tried this:</p>
  
  <pre><code>'Hello {user.name}'.format( {'user': { 'name': 'Markus' } } )
  KeyError: 'user'
  
  'Hello {user.name}'.format( **{'user': { 'name': 'Markus' } } )
  AttributeError: 'dict' object has no attribute 'name'
  </code></pre>
  
  <p>Is there a way to do it?</p>