title: lisp-style style `let` syntax in Python list-comprehensions
body: <p>Consider the following code:</p>
  
  <pre><code>&gt;&gt;&gt; colprint([
          (name, versions[name][0].summary or '')
          for name in sorted(versions.keys())
      ])
  </code></pre>
  
  <p>What this code does is to print the elements of the dictionary <code>versions</code> in ascending order of its <code>keys</code>, but since the <code>value</code> is another sorted list, only the summary of its <em>first</em> element (the 'max') is printed.</p>
  
  <p>Since I am familiar with <code>let</code> from lisp, I rewrote the above as:</p>
  
  <pre><code>&gt;&gt;&gt; colprint([
          (name, package.summary or '')
          for name in sorted(versions.keys())
          for package in [versions[name][0]]
      )]
  </code></pre>
  
  <p>Do you think this violates <a href="http://www.python.org/dev/peps/pep-0020/" rel="nofollow noreferrer">being Pythonic</a>? Can it be improved?</p>
  
  <p>Note: For the curious, <code>colprint</code> is defined <a href="https://stackoverflow.com/questions/1396820/apt-like-column-output-python-library/1397382#1397382">here</a>.</p>