title: python's ".format" function
body: <p>Recently, I found <code>''.format</code> function very useful because it can improve readability a lot comparing to the <code>%</code> formatting.
  Trying to achieve simple string formatting:</p>
  
  <pre><code>data = {'year':2012, 'month':'april', 'location': 'q2dm1'}
  
  year = 2012
  month = 'april'
  location = 'q2dm1'
  a = "year: {year}, month: {month}, location: {location}"
  print a.format(data)
  print a.format(year=year, month=month, location=location)
  print a.format(year, month, location)
  </code></pre>
  
  <p>Whilst two first prints do format as I expect (yes, <code>something=something</code> looks ugly, but that's an example only), the last one would raise <code>KeyError: 'year'</code>.
  Is there any trick in python to create dictionary so it will automatically fill keys and values, for example <code>somefunc(year, month, location)</code> will output <code>{'year':year, 'month': month, 'location': location}</code>?</p>
  
  <p>I'm pretty new to python and couldn't find any info on this topic, however a trick like this would improve and shrink my current code drastically.</p>
  
  <p>Thanks in advance and pardon my English.</p>