title: Python "with" Keyword in Lambda Functions
body: <p>How is Python's <code>with</code> keyword expressed in a lambda function? Consider the following:</p>
  
  <pre><code>def cat (filename):
      with open(filename, 'r') as f:
          return f.read()
  </code></pre>
  
  <p>A failed attempt at a lambda implementation:</p>
  
  <pre><code>cat = lambda filename: with open(filename, 'r') as f: return f.read()
  </code></pre>