1.1 --- a/compiler/transformer.py Sun Feb 26 14:29:36 2017 +0100
1.2 +++ b/compiler/transformer.py Sun Feb 26 21:47:56 2017 +0100
1.3 @@ -468,9 +468,6 @@
1.4 def try_stmt(self, nodelist):
1.5 return self.com_try_except_finally(nodelist)
1.6
1.7 - def with_stmt(self, nodelist):
1.8 - return self.com_with(nodelist)
1.9 -
1.10 def suite(self, nodelist):
1.11 # simple_stmt | NEWLINE INDENT NEWLINE* (stmt NEWLINE*)+ DEDENT
1.12 if len(nodelist) == 1:
1.13 @@ -874,24 +871,6 @@
1.14 else:
1.15 return try_except
1.16
1.17 - def com_with(self, nodelist):
1.18 - # with_stmt: 'with' with_item (',' with_item)* ':' suite
1.19 - body = self.com_node(nodelist[-1])
1.20 - for i in range(len(nodelist) - 3, 0, -2):
1.21 - ret = self.com_with_item(nodelist[i], body, nodelist[0][2])
1.22 - if i == 1:
1.23 - return ret
1.24 - body = ret
1.25 -
1.26 - def com_with_item(self, nodelist, body, lineno):
1.27 - # with_item: test ['as' expr]
1.28 - if len(nodelist) == 4:
1.29 - var = self.com_assign(nodelist[3], OP_ASSIGN)
1.30 - else:
1.31 - var = None
1.32 - expr = self.com_node(nodelist[1])
1.33 - return With(expr, var, body, lineno=lineno)
1.34 -
1.35 def com_augassign_op(self, node):
1.36 assert node[0] == symbol["augassign"]
1.37 return node[1]
1.38 @@ -1268,7 +1247,6 @@
1.39 symbol["while_stmt"],
1.40 symbol["for_stmt"],
1.41 symbol["try_stmt"],
1.42 - symbol["with_stmt"],
1.43 symbol["suite"],
1.44 symbol["testlist"],
1.45 symbol["testlist_safe"],