mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
Merged revisions 72924 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r72924 | georg.brandl | 2009-05-25 23:02:56 +0200 (Mo, 25 Mai 2009) | 6 lines 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. ........
This commit is contained in:
parent
0c1829b919
commit
0c31562a91
9 changed files with 181 additions and 61 deletions
|
@ -193,6 +193,7 @@ class RoundtripLegalSyntaxTestCase(unittest.TestCase):
|
|||
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")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue