title: Python: is using "..%(var)s.." % locals() a good practice?
body: <p>I discovered this pattern (or anti-pattern) and I am very happy with it.</p>
  
  <p>I feel it is very agile:</p>
  
  <pre><code>def example():
      age = ...
      name = ...
      print "hello %(name)s you are %(age)s years old" % locals()
  </code></pre>
  
  <p>Sometimes I use its cousin:</p>
  
  <pre><code>def example2(obj):
      print "The file at %(path)s has %(length)s bytes" % obj.__dict__
  </code></pre>
  
  <p>I don't need to create an artificial tuple and count parameters and keep the %s matching positions inside the tuple.</p>
  
  <p>Do you like it? Do/Would you use it? Yes/No, please explain.</p>