title: Python multi-line with statement
body: <p>What is a clean way to create a multi-line <code>with</code> in python? I want to open up several files inside a single <code>with</code>, but it's far enough to the right that I want it on multiple lines. Like this:</p>
  
  <pre><code>class Dummy:
      def __enter__(self): pass
      def __exit__(self, type, value, traceback): pass
  
  with Dummy() as a, Dummy() as b,
       Dummy() as c:
      pass
  </code></pre>
  
  <p>Unfortunately, that is a <code>SyntaxError</code>. So I tried this:</p>
  
  <pre><code>with (Dummy() as a, Dummy() as b,
        Dummy() as c):
      pass
  </code></pre>
  
  <p>Also a syntax error. However, this worked:</p>
  
  <pre><code>with Dummy() as a, Dummy() as b,\
       Dummy() as c:
      pass
  </code></pre>
  
  <p>But what if I wanted to place a comment? This does not work:</p>
  
  <pre><code>with Dummy() as a, Dummy() as b,\
       # my comment explaining why I wanted Dummy() as c\
       Dummy() as c:
      pass
  </code></pre>
  
  <p>Nor does any obvious variation on the placement of the <code>\</code>s.</p>
  
  <p>Is there a clean way to create a multi-line <code>with</code> statement that allows comments inside it?</p>