Allow multiple context managers in one with statement, as proposed
in http://codereview.appspot.com/53094 and accepted by Guido.
The construct is transformed into multiple With AST nodes so that
there should be no problems with the semantics.
diff --git a/Lib/test/test_parser.py b/Lib/test/test_parser.py
index 23f418e..7d059c2 100644
--- a/Lib/test/test_parser.py
+++ b/Lib/test/test_parser.py
@@ -199,6 +199,7 @@
def test_with(self):
self.check_suite("with open('x'): pass\n")
self.check_suite("with open('x') as f: pass\n")
+ self.check_suite("with open('x') as f, open('y') as g: pass\n")
def test_try_stmt(self):
self.check_suite("try: pass\nexcept: pass\n")