Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(165450)

Delta Between Two Patch Sets: Lib/test/test_ast.py

Issue 16510: Using appropriate checks in tests
Left Patch Set: Created 7 years ago
Right Patch Set: Created 5 years, 10 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « Lib/test/test_abc.py ('k') | Lib/test/test_asyncore.py » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 import os 1 import os
2 import sys 2 import sys
3 import unittest 3 import unittest
4 import ast 4 import ast
5 import weakref 5 import weakref
6 6
7 from test import support 7 from test import support
8 8
9 def to_tuple(t): 9 def to_tuple(t):
10 if t is None or isinstance(t, (str, int, complex)): 10 if t is None or isinstance(t, (str, int, complex)):
11 return t 11 return t
12 elif isinstance(t, list): 12 elif isinstance(t, list):
13 return [to_tuple(e) for e in t] 13 return [to_tuple(e) for e in t]
14 result = [t.__class__.__name__] 14 result = [t.__class__.__name__]
15 if hasattr(t, 'lineno') and hasattr(t, 'col_offset'): 15 if hasattr(t, 'lineno') and hasattr(t, 'col_offset'):
16 result.append((t.lineno, t.col_offset)) 16 result.append((t.lineno, t.col_offset))
17 if t._fields is None: 17 if t._fields is None:
18 return tuple(result) 18 return tuple(result)
19 for f in t._fields: 19 for f in t._fields:
20 result.append(to_tuple(getattr(t, f))) 20 result.append(to_tuple(getattr(t, f)))
21 return tuple(result) 21 return tuple(result)
22 22
23 23
24 # These tests are compiled through "exec" 24 # These tests are compiled through "exec"
25 # There should be atleast one test per statement 25 # There should be at least one test per statement
26 exec_tests = [ 26 exec_tests = [
27 # None 27 # None
28 "None", 28 "None",
29 # FunctionDef 29 # FunctionDef
30 "def f(): pass", 30 "def f(): pass",
31 # FunctionDef with arg 31 # FunctionDef with arg
32 "def f(a): pass", 32 "def f(a): pass",
33 # FunctionDef with arg and default value 33 # FunctionDef with arg and default value
34 "def f(a=0): pass", 34 "def f(a=0): pass",
35 # FunctionDef with varargs 35 # FunctionDef with varargs
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 # Combination 173 # Combination
174 "a.b.c.d(a.b[1:2])", 174 "a.b.c.d(a.b[1:2])",
175 175
176 ] 176 ]
177 177
178 # TODO: expr_context, slice, boolop, operator, unaryop, cmpop, comprehension 178 # TODO: expr_context, slice, boolop, operator, unaryop, cmpop, comprehension
179 # excepthandler, arguments, keywords, alias 179 # excepthandler, arguments, keywords, alias
180 180
181 class AST_Tests(unittest.TestCase): 181 class AST_Tests(unittest.TestCase):
182 182
183 def _assertTrueorder(self, ast_node, parent_pos): 183 def _assertTrueorder(self, ast_node, parent_pos, reverse_check = False):
184 def should_reverse_check(parent, child):
185 # In some situations, the children of nodes occur before
186 # their parents, for example in a.b.c, a occurs before b
187 # but a is a child of b.
188 if isinstance(parent, ast.Call):
189 if parent.func == child:
190 return True
191 if isinstance(parent, (ast.Attribute, ast.Subscript)):
192 return True
193 return False
194
184 if not isinstance(ast_node, ast.AST) or ast_node._fields is None: 195 if not isinstance(ast_node, ast.AST) or ast_node._fields is None:
185 return 196 return
186 if isinstance(ast_node, (ast.expr, ast.stmt, ast.excepthandler)): 197 if isinstance(ast_node, (ast.expr, ast.stmt, ast.excepthandler)):
187 node_pos = (ast_node.lineno, ast_node.col_offset) 198 node_pos = (ast_node.lineno, ast_node.col_offset)
188 self.assertGreaterEqual(node_pos, parent_pos) 199 if reverse_check:
200 self.assertLessEqual(node_pos, parent_pos)
201 else:
202 self.assertGreaterEqual(node_pos, parent_pos)
189 parent_pos = (ast_node.lineno, ast_node.col_offset) 203 parent_pos = (ast_node.lineno, ast_node.col_offset)
190 for name in ast_node._fields: 204 for name in ast_node._fields:
191 value = getattr(ast_node, name) 205 value = getattr(ast_node, name)
192 if isinstance(value, list): 206 if isinstance(value, list):
193 for child in value: 207 for child in value:
194 self._assertTrueorder(child, parent_pos) 208 self._assertTrueorder(child, parent_pos,
209 should_reverse_check(ast_node, child))
195 elif value is not None: 210 elif value is not None:
196 self._assertTrueorder(value, parent_pos) 211 self._assertTrueorder(value, parent_pos,
212 should_reverse_check(ast_node, value))
197 213
198 def test_AST_objects(self): 214 def test_AST_objects(self):
199 x = ast.AST() 215 x = ast.AST()
200 self.assertEqual(x._fields, ()) 216 self.assertEqual(x._fields, ())
201 x.foobar = 42 217 x.foobar = 42
202 self.assertEqual(x.foobar, 42) 218 self.assertEqual(x.foobar, 42)
203 self.assertEqual(x.__dict__["foobar"], 42) 219 self.assertEqual(x.__dict__["foobar"], 42)
204 220
205 with self.assertRaises(AttributeError): 221 with self.assertRaises(AttributeError):
206 x.vararg 222 x.vararg
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 271
256 def test_field_attr_existence(self): 272 def test_field_attr_existence(self):
257 for name, item in ast.__dict__.items(): 273 for name, item in ast.__dict__.items():
258 if isinstance(item, type) and name != 'AST' and name[0].isupper(): 274 if isinstance(item, type) and name != 'AST' and name[0].isupper():
259 x = item() 275 x = item()
260 if isinstance(x, ast.AST): 276 if isinstance(x, ast.AST):
261 self.assertEqual(type(x._fields), tuple) 277 self.assertEqual(type(x._fields), tuple)
262 278
263 def test_arguments(self): 279 def test_arguments(self):
264 x = ast.arguments() 280 x = ast.arguments()
265 self.assertEqual(x._fields, ('args', 'vararg', 'varargannotation', 281 self.assertEqual(x._fields, ('args', 'vararg',
266 'kwonlyargs', 'kwarg', 'kwargannotation', 282 'kwonlyargs', 'kw_defaults',
267 'defaults', 'kw_defaults')) 283 'kwarg', 'defaults'))
268 284
269 with self.assertRaises(AttributeError): 285 with self.assertRaises(AttributeError):
270 x.vararg 286 x.vararg
271 287
272 x = ast.arguments(*range(1, 9)) 288 x = ast.arguments(*range(1, 7))
273 self.assertEqual(x.vararg, 2) 289 self.assertEqual(x.vararg, 2)
274 290
275 def test_field_attr_writable(self): 291 def test_field_attr_writable(self):
276 x = ast.Num() 292 x = ast.Num()
277 # We can assign to _fields 293 # We can assign to _fields
278 x._fields = 666 294 x._fields = 666
279 self.assertEqual(x._fields, 666) 295 self.assertEqual(x._fields, 666)
280 296
281 def test_classattrs(self): 297 def test_classattrs(self):
282 x = ast.Num() 298 x = ast.Num()
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
391 with self.assertRaises(TypeError) as cm: 407 with self.assertRaises(TypeError) as cm:
392 compile(m, "<test>", "exec") 408 compile(m, "<test>", "exec")
393 self.assertIn("identifier must be of type str", str(cm.exception)) 409 self.assertIn("identifier must be of type str", str(cm.exception))
394 410
395 def test_invalid_string(self): 411 def test_invalid_string(self):
396 m = ast.Module([ast.Expr(ast.Str(42))]) 412 m = ast.Module([ast.Expr(ast.Str(42))])
397 ast.fix_missing_locations(m) 413 ast.fix_missing_locations(m)
398 with self.assertRaises(TypeError) as cm: 414 with self.assertRaises(TypeError) as cm:
399 compile(m, "<test>", "exec") 415 compile(m, "<test>", "exec")
400 self.assertIn("string must be of type str", str(cm.exception)) 416 self.assertIn("string must be of type str", str(cm.exception))
417
418 def test_empty_yield_from(self):
419 # Issue 16546: yield from value is not optional.
420 empty_yield_from = ast.parse("def f():\n yield from g()")
421 empty_yield_from.body[0].body[0].value.value = None
422 with self.assertRaises(ValueError) as cm:
423 compile(empty_yield_from, "<test>", "exec")
424 self.assertIn("field value is required", str(cm.exception))
401 425
402 426
403 class ASTHelpers_Test(unittest.TestCase): 427 class ASTHelpers_Test(unittest.TestCase):
404 428
405 def test_parse(self): 429 def test_parse(self):
406 a = ast.parse('foo(1 + 1)') 430 a = ast.parse('foo(1 + 1)')
407 b = compile('foo(1 + 1)', '<unknown>', 'exec', ast.PyCF_ONLY_AST) 431 b = compile('foo(1 + 1)', '<unknown>', 'exec', ast.PyCF_ONLY_AST)
408 self.assertEqual(ast.dump(a), ast.dump(b)) 432 self.assertEqual(ast.dump(a), ast.dump(b))
409 433
410 def test_parse_in_error(self): 434 def test_parse_in_error(self):
(...skipping 13 matching lines...) Expand all
424 ) 448 )
425 self.assertEqual(ast.dump(node, annotate_fields=False), 449 self.assertEqual(ast.dump(node, annotate_fields=False),
426 "Module([Expr(Call(Name('spam', Load()), [Name('eggs', Load()), " 450 "Module([Expr(Call(Name('spam', Load()), [Name('eggs', Load()), "
427 "Str('and cheese')], [], None, None))])" 451 "Str('and cheese')], [], None, None))])"
428 ) 452 )
429 self.assertEqual(ast.dump(node, include_attributes=True), 453 self.assertEqual(ast.dump(node, include_attributes=True),
430 "Module(body=[Expr(value=Call(func=Name(id='spam', ctx=Load(), " 454 "Module(body=[Expr(value=Call(func=Name(id='spam', ctx=Load(), "
431 "lineno=1, col_offset=0), args=[Name(id='eggs', ctx=Load(), " 455 "lineno=1, col_offset=0), args=[Name(id='eggs', ctx=Load(), "
432 "lineno=1, col_offset=5), Str(s='and cheese', lineno=1, " 456 "lineno=1, col_offset=5), Str(s='and cheese', lineno=1, "
433 "col_offset=11)], keywords=[], starargs=None, kwargs=None, " 457 "col_offset=11)], keywords=[], starargs=None, kwargs=None, "
434 "lineno=1, col_offset=0), lineno=1, col_offset=0)])" 458 "lineno=1, col_offset=4), lineno=1, col_offset=0)])"
435 ) 459 )
436 460
437 def test_copy_location(self): 461 def test_copy_location(self):
438 src = ast.parse('1 + 1', mode='eval') 462 src = ast.parse('1 + 1', mode='eval')
439 src.body.right = ast.copy_location(ast.Num(2), src.body.right) 463 src.body.right = ast.copy_location(ast.Num(2), src.body.right)
440 self.assertEqual(ast.dump(src, include_attributes=True), 464 self.assertEqual(ast.dump(src, include_attributes=True),
441 'Expression(body=BinOp(left=Num(n=1, lineno=1, col_offset=0), ' 465 'Expression(body=BinOp(left=Num(n=1, lineno=1, col_offset=0), '
442 'op=Add(), right=Num(n=2, lineno=1, col_offset=4), lineno=1, ' 466 'op=Add(), right=Num(n=2, lineno=1, col_offset=4), lineno=1, '
443 'col_offset=0))' 467 'col_offset=0))'
444 ) 468 )
445 469
446 def test_fix_missing_locations(self): 470 def test_fix_missing_locations(self):
447 src = ast.parse('write("spam")') 471 src = ast.parse('write("spam")')
448 src.body.append(ast.Expr(ast.Call(ast.Name('spam', ast.Load()), 472 src.body.append(ast.Expr(ast.Call(ast.Name('spam', ast.Load()),
449 [ast.Str('eggs')], [], None, None))) 473 [ast.Str('eggs')], [], None, None)))
450 self.assertEqual(src, ast.fix_missing_locations(src)) 474 self.assertEqual(src, ast.fix_missing_locations(src))
451 self.assertEqual(ast.dump(src, include_attributes=True), 475 self.assertEqual(ast.dump(src, include_attributes=True),
452 "Module(body=[Expr(value=Call(func=Name(id='write', ctx=Load(), " 476 "Module(body=[Expr(value=Call(func=Name(id='write', ctx=Load(), "
453 "lineno=1, col_offset=0), args=[Str(s='spam', lineno=1, " 477 "lineno=1, col_offset=0), args=[Str(s='spam', lineno=1, "
454 "col_offset=6)], keywords=[], starargs=None, kwargs=None, " 478 "col_offset=6)], keywords=[], starargs=None, kwargs=None, "
455 "lineno=1, col_offset=0), lineno=1, col_offset=0), " 479 "lineno=1, col_offset=5), lineno=1, col_offset=0), "
456 "Expr(value=Call(func=Name(id='spam', ctx=Load(), lineno=1, " 480 "Expr(value=Call(func=Name(id='spam', ctx=Load(), lineno=1, "
457 "col_offset=0), args=[Str(s='eggs', lineno=1, col_offset=0)], " 481 "col_offset=0), args=[Str(s='eggs', lineno=1, col_offset=0)], "
458 "keywords=[], starargs=None, kwargs=None, lineno=1, " 482 "keywords=[], starargs=None, kwargs=None, lineno=1, "
459 "col_offset=0), lineno=1, col_offset=0)])" 483 "col_offset=0), lineno=1, col_offset=0)])"
460 ) 484 )
461 485
462 def test_increment_lineno(self): 486 def test_increment_lineno(self):
463 src = ast.parse('1 + 1', mode='eval') 487 src = ast.parse('1 + 1', mode='eval')
464 self.assertEqual(ast.increment_lineno(src, n=3), src) 488 self.assertEqual(ast.increment_lineno(src, n=3), src)
465 self.assertEqual(ast.dump(src, include_attributes=True), 489 self.assertEqual(ast.dump(src, include_attributes=True),
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
545 mod = ast.Module([stmt]) 569 mod = ast.Module([stmt])
546 self.mod(mod, msg) 570 self.mod(mod, msg)
547 571
548 def test_module(self): 572 def test_module(self):
549 m = ast.Interactive([ast.Expr(ast.Name("x", ast.Store()))]) 573 m = ast.Interactive([ast.Expr(ast.Name("x", ast.Store()))])
550 self.mod(m, "must have Load context", "single") 574 self.mod(m, "must have Load context", "single")
551 m = ast.Expression(ast.Name("x", ast.Store())) 575 m = ast.Expression(ast.Name("x", ast.Store()))
552 self.mod(m, "must have Load context", "eval") 576 self.mod(m, "must have Load context", "eval")
553 577
554 def _check_arguments(self, fac, check): 578 def _check_arguments(self, fac, check):
555 def arguments(args=None, vararg=None, varargannotation=None, 579 def arguments(args=None, vararg=None,
556 kwonlyargs=None, kwarg=None, kwargannotation=None, 580 kwonlyargs=None, kwarg=None,
557 defaults=None, kw_defaults=None): 581 defaults=None, kw_defaults=None):
558 if args is None: 582 if args is None:
559 args = [] 583 args = []
560 if kwonlyargs is None: 584 if kwonlyargs is None:
561 kwonlyargs = [] 585 kwonlyargs = []
562 if defaults is None: 586 if defaults is None:
563 defaults = [] 587 defaults = []
564 if kw_defaults is None: 588 if kw_defaults is None:
565 kw_defaults = [] 589 kw_defaults = []
566 args = ast.arguments(args, vararg, varargannotation, kwonlyargs, 590 args = ast.arguments(args, vararg, kwonlyargs, kw_defaults,
567 kwarg, kwargannotation, defaults, kw_defaults) 591 kwarg, defaults)
568 return fac(args) 592 return fac(args)
569 args = [ast.arg("x", ast.Name("x", ast.Store()))] 593 args = [ast.arg("x", ast.Name("x", ast.Store()))]
570 check(arguments(args=args), "must have Load context") 594 check(arguments(args=args), "must have Load context")
571 check(arguments(varargannotation=ast.Num(3)),
572 "varargannotation but no vararg")
573 check(arguments(varargannotation=ast.Name("x", ast.Store()), vararg="x") ,
574 "must have Load context")
575 check(arguments(kwonlyargs=args), "must have Load context") 595 check(arguments(kwonlyargs=args), "must have Load context")
576 check(arguments(kwargannotation=ast.Num(42)),
577 "kwargannotation but no kwarg")
578 check(arguments(kwargannotation=ast.Name("x", ast.Store()),
579 kwarg="x"), "must have Load context")
580 check(arguments(defaults=[ast.Num(3)]), 596 check(arguments(defaults=[ast.Num(3)]),
581 "more positional defaults than args") 597 "more positional defaults than args")
582 check(arguments(kw_defaults=[ast.Num(4)]), 598 check(arguments(kw_defaults=[ast.Num(4)]),
583 "length of kwonlyargs is not the same as kw_defaults") 599 "length of kwonlyargs is not the same as kw_defaults")
584 args = [ast.arg("x", ast.Name("x", ast.Load()))] 600 args = [ast.arg("x", ast.Name("x", ast.Load()))]
585 check(arguments(args=args, defaults=[ast.Name("x", ast.Store())]), 601 check(arguments(args=args, defaults=[ast.Name("x", ast.Store())]),
586 "must have Load context") 602 "must have Load context")
587 args = [ast.arg("a", ast.Name("x", ast.Load())), 603 args = [ast.arg("a", ast.Name("x", ast.Load())),
588 ast.arg("b", ast.Name("y", ast.Load()))] 604 ast.arg("b", ast.Name("y", ast.Load()))]
589 check(arguments(kwonlyargs=args, 605 check(arguments(kwonlyargs=args,
590 kw_defaults=[None, ast.Name("x", ast.Store())]), 606 kw_defaults=[None, ast.Name("x", ast.Store())]),
591 "must have Load context") 607 "must have Load context")
592 608
593 def test_funcdef(self): 609 def test_funcdef(self):
594 a = ast.arguments([], None, None, [], None, None, [], []) 610 a = ast.arguments([], None, [], [], None, [])
595 f = ast.FunctionDef("x", a, [], [], None) 611 f = ast.FunctionDef("x", a, [], [], None)
596 self.stmt(f, "empty body on FunctionDef") 612 self.stmt(f, "empty body on FunctionDef")
597 f = ast.FunctionDef("x", a, [ast.Pass()], [ast.Name("x", ast.Store())], 613 f = ast.FunctionDef("x", a, [ast.Pass()], [ast.Name("x", ast.Store())],
598 None) 614 None)
599 self.stmt(f, "must have Load context") 615 self.stmt(f, "must have Load context")
600 f = ast.FunctionDef("x", a, [ast.Pass()], [], 616 f = ast.FunctionDef("x", a, [ast.Pass()], [],
601 ast.Name("x", ast.Store())) 617 ast.Name("x", ast.Store()))
602 self.stmt(f, "must have Load context") 618 self.stmt(f, "must have Load context")
603 def fac(args): 619 def fac(args):
604 return ast.FunctionDef("x", args, [ast.Pass()], [], None) 620 return ast.FunctionDef("x", args, [ast.Pass()], [], None)
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
755 b = ast.BoolOp(ast.And(), [ast.Num(4), None]) 771 b = ast.BoolOp(ast.And(), [ast.Num(4), None])
756 self.expr(b, "None disallowed") 772 self.expr(b, "None disallowed")
757 b = ast.BoolOp(ast.And(), [ast.Num(4), ast.Name("x", ast.Store())]) 773 b = ast.BoolOp(ast.And(), [ast.Num(4), ast.Name("x", ast.Store())])
758 self.expr(b, "must have Load context") 774 self.expr(b, "must have Load context")
759 775
760 def test_unaryop(self): 776 def test_unaryop(self):
761 u = ast.UnaryOp(ast.Not(), ast.Name("x", ast.Store())) 777 u = ast.UnaryOp(ast.Not(), ast.Name("x", ast.Store()))
762 self.expr(u, "must have Load context") 778 self.expr(u, "must have Load context")
763 779
764 def test_lambda(self): 780 def test_lambda(self):
765 a = ast.arguments([], None, None, [], None, None, [], []) 781 a = ast.arguments([], None, [], [], None, [])
766 self.expr(ast.Lambda(a, ast.Name("x", ast.Store())), 782 self.expr(ast.Lambda(a, ast.Name("x", ast.Store())),
767 "must have Load context") 783 "must have Load context")
768 def fac(args): 784 def fac(args):
769 return ast.Lambda(args, ast.Name("x", ast.Load())) 785 return ast.Lambda(args, ast.Name("x", ast.Load()))
770 self._check_arguments(fac, self.expr) 786 self._check_arguments(fac, self.expr)
771 787
772 def test_ifexp(self): 788 def test_ifexp(self):
773 l = ast.Name("x", ast.Load()) 789 l = ast.Name("x", ast.Load())
774 s = ast.Name("y", ast.Store()) 790 s = ast.Name("y", ast.Store())
775 for args in (s, l, l), (l, s, l), (l, l, s): 791 for args in (s, l, l), (l, s, l), (l, l, s):
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
913 self.expr(fac([None], ast.Load()), "None disallowed") 929 self.expr(fac([None], ast.Load()), "None disallowed")
914 self.expr(fac([ast.Name("x", ast.Store())], ast.Load()), 930 self.expr(fac([ast.Name("x", ast.Store())], ast.Load()),
915 "must have Load context") 931 "must have Load context")
916 932
917 def test_list(self): 933 def test_list(self):
918 self._sequence(ast.List) 934 self._sequence(ast.List)
919 935
920 def test_tuple(self): 936 def test_tuple(self):
921 self._sequence(ast.Tuple) 937 self._sequence(ast.Tuple)
922 938
939 def test_nameconstant(self):
940 self.expr(ast.NameConstant(4), "singleton must be True, False, or None")
941
923 def test_stdlib_validates(self): 942 def test_stdlib_validates(self):
924 stdlib = os.path.dirname(ast.__file__) 943 stdlib = os.path.dirname(ast.__file__)
925 tests = [fn for fn in os.listdir(stdlib) if fn.endswith(".py")] 944 tests = [fn for fn in os.listdir(stdlib) if fn.endswith(".py")]
926 tests.extend(["test/test_grammar.py", "test/test_unpack_ex.py"]) 945 tests.extend(["test/test_grammar.py", "test/test_unpack_ex.py"])
927 for module in tests: 946 for module in tests:
928 fn = os.path.join(stdlib, module) 947 fn = os.path.join(stdlib, module)
929 with open(fn, "r", encoding="utf-8") as fp: 948 with open(fn, "r", encoding="utf-8") as fp:
930 source = fp.read() 949 source = fp.read()
931 mod = ast.parse(source) 950 mod = ast.parse(source, fn)
932 compile(mod, fn, "exec") 951 compile(mod, fn, "exec")
933 952
934
935 def test_main():
936 support.run_unittest(AST_Tests, ASTHelpers_Test, ASTValidatorTests)
937 953
938 def main(): 954 def main():
939 if __name__ != '__main__': 955 if __name__ != '__main__':
940 return 956 return
941 if sys.argv[1:] == ['-g']: 957 if sys.argv[1:] == ['-g']:
942 for statements, kind in ((exec_tests, "exec"), (single_tests, "single"), 958 for statements, kind in ((exec_tests, "exec"), (single_tests, "single"),
943 (eval_tests, "eval")): 959 (eval_tests, "eval")):
944 print(kind+"_results = [") 960 print(kind+"_results = [")
945 for s in statements: 961 for s in statements:
946 print(repr(to_tuple(compile(s, "?", kind, 0x400)))+",") 962 print(repr(to_tuple(compile(s, "?", kind, 0x400)))+",")
947 print("]") 963 print("]")
948 print("main()") 964 print("main()")
949 raise SystemExit 965 raise SystemExit
950 test_main() 966 unittest.main()
951 967
952 #### EVERYTHING BELOW IS GENERATED ##### 968 #### EVERYTHING BELOW IS GENERATED #####
953 exec_results = [ 969 exec_results = [
954 ('Module', [('Expr', (1, 0), ('Name', (1, 0), 'None', ('Load',)))]), 970 ('Module', [('Expr', (1, 0), ('NameConstant', (1, 0), None))]),
955 ('Module', [('FunctionDef', (1, 0), 'f', ('arguments', [], None, None, [], None, None, [], []), [('Pass', (1, 9))], [], None)]), 971 ('Module', [('FunctionDef', (1, 0), 'f', ('arguments', [], None, [], [], None, [ ]), [('Pass', (1, 9))], [], None)]),
956 ('Module', [('FunctionDef', (1, 0), 'f', ('arguments', [('arg', 'a', None)], Non e, None, [], None, None, [], []), [('Pass', (1, 10))], [], None)]), 972 ('Module', [('FunctionDef', (1, 0), 'f', ('arguments', [('arg', (1, 6), 'a', Non e)], None, [], [], None, []), [('Pass', (1, 10))], [], None)]),
957 ('Module', [('FunctionDef', (1, 0), 'f', ('arguments', [('arg', 'a', None)], Non e, None, [], None, None, [('Num', (1, 8), 0)], []), [('Pass', (1, 12))], [], Non e)]), 973 ('Module', [('FunctionDef', (1, 0), 'f', ('arguments', [('arg', (1, 6), 'a', Non e)], None, [], [], None, [('Num', (1, 8), 0)]), [('Pass', (1, 12))], [], None)]) ,
958 ('Module', [('FunctionDef', (1, 0), 'f', ('arguments', [], 'args', None, [], Non e, None, [], []), [('Pass', (1, 14))], [], None)]), 974 ('Module', [('FunctionDef', (1, 0), 'f', ('arguments', [], ('arg', (1, 7), 'args ', None), [], [], None, []), [('Pass', (1, 14))], [], None)]),
959 ('Module', [('FunctionDef', (1, 0), 'f', ('arguments', [], None, None, [], 'kwar gs', None, [], []), [('Pass', (1, 17))], [], None)]), 975 ('Module', [('FunctionDef', (1, 0), 'f', ('arguments', [], None, [], [], ('arg', (1, 8), 'kwargs', None), []), [('Pass', (1, 17))], [], None)]),
960 ('Module', [('FunctionDef', (1, 0), 'f', ('arguments', [('arg', 'a', None), ('ar g', 'b', None), ('arg', 'c', None), ('arg', 'd', None), ('arg', 'e', None)], 'ar gs', None, [], 'kwargs', None, [('Num', (1, 11), 1), ('Name', (1, 16), 'None', ( 'Load',)), ('List', (1, 24), [], ('Load',)), ('Dict', (1, 30), [], [])], []), [( 'Pass', (1, 52))], [], None)]), 976 ('Module', [('FunctionDef', (1, 0), 'f', ('arguments', [('arg', (1, 6), 'a', Non e), ('arg', (1, 9), 'b', None), ('arg', (1, 14), 'c', None), ('arg', (1, 22), 'd ', None), ('arg', (1, 28), 'e', None)], ('arg', (1, 35), 'args', None), [], [], ('arg', (1, 43), 'kwargs', None), [('Num', (1, 11), 1), ('NameConstant', (1, 16) , None), ('List', (1, 24), [], ('Load',)), ('Dict', (1, 30), [], [])]), [('Pass' , (1, 52))], [], None)]),
961 ('Module', [('ClassDef', (1, 0), 'C', [], [], None, None, [('Pass', (1, 8))], [] )]), 977 ('Module', [('ClassDef', (1, 0), 'C', [], [], None, None, [('Pass', (1, 8))], [] )]),
962 ('Module', [('ClassDef', (1, 0), 'C', [('Name', (1, 8), 'object', ('Load',))], [ ], None, None, [('Pass', (1, 17))], [])]), 978 ('Module', [('ClassDef', (1, 0), 'C', [('Name', (1, 8), 'object', ('Load',))], [ ], None, None, [('Pass', (1, 17))], [])]),
963 ('Module', [('FunctionDef', (1, 0), 'f', ('arguments', [], None, None, [], None, None, [], []), [('Return', (1, 8), ('Num', (1, 15), 1))], [], None)]), 979 ('Module', [('FunctionDef', (1, 0), 'f', ('arguments', [], None, [], [], None, [ ]), [('Return', (1, 8), ('Num', (1, 15), 1))], [], None)]),
964 ('Module', [('Delete', (1, 0), [('Name', (1, 4), 'v', ('Del',))])]), 980 ('Module', [('Delete', (1, 0), [('Name', (1, 4), 'v', ('Del',))])]),
965 ('Module', [('Assign', (1, 0), [('Name', (1, 0), 'v', ('Store',))], ('Num', (1, 4), 1))]), 981 ('Module', [('Assign', (1, 0), [('Name', (1, 0), 'v', ('Store',))], ('Num', (1, 4), 1))]),
966 ('Module', [('AugAssign', (1, 0), ('Name', (1, 0), 'v', ('Store',)), ('Add',), ( 'Num', (1, 5), 1))]), 982 ('Module', [('AugAssign', (1, 0), ('Name', (1, 0), 'v', ('Store',)), ('Add',), ( 'Num', (1, 5), 1))]),
967 ('Module', [('For', (1, 0), ('Name', (1, 4), 'v', ('Store',)), ('Name', (1, 9), 'v', ('Load',)), [('Pass', (1, 11))], [])]), 983 ('Module', [('For', (1, 0), ('Name', (1, 4), 'v', ('Store',)), ('Name', (1, 9), 'v', ('Load',)), [('Pass', (1, 11))], [])]),
968 ('Module', [('While', (1, 0), ('Name', (1, 6), 'v', ('Load',)), [('Pass', (1, 8) )], [])]), 984 ('Module', [('While', (1, 0), ('Name', (1, 6), 'v', ('Load',)), [('Pass', (1, 8) )], [])]),
969 ('Module', [('If', (1, 0), ('Name', (1, 3), 'v', ('Load',)), [('Pass', (1, 5))], [])]), 985 ('Module', [('If', (1, 0), ('Name', (1, 3), 'v', ('Load',)), [('Pass', (1, 5))], [])]),
970 ('Module', [('With', (1, 0), [('withitem', ('Name', (1, 5), 'x', ('Load',)), ('N ame', (1, 10), 'y', ('Store',)))], [('Pass', (1, 13))])]), 986 ('Module', [('With', (1, 0), [('withitem', ('Name', (1, 5), 'x', ('Load',)), ('N ame', (1, 10), 'y', ('Store',)))], [('Pass', (1, 13))])]),
971 ('Module', [('With', (1, 0), [('withitem', ('Name', (1, 5), 'x', ('Load',)), ('N ame', (1, 10), 'y', ('Store',))), ('withitem', ('Name', (1, 13), 'z', ('Load',)) , ('Name', (1, 18), 'q', ('Store',)))], [('Pass', (1, 21))])]), 987 ('Module', [('With', (1, 0), [('withitem', ('Name', (1, 5), 'x', ('Load',)), ('N ame', (1, 10), 'y', ('Store',))), ('withitem', ('Name', (1, 13), 'z', ('Load',)) , ('Name', (1, 18), 'q', ('Store',)))], [('Pass', (1, 21))])]),
972 ('Module', [('Raise', (1, 0), ('Call', (1, 6), ('Name', (1, 6), 'Exception', ('L oad',)), [('Str', (1, 16), 'string')], [], None, None), None)]), 988 ('Module', [('Raise', (1, 0), ('Call', (1, 15), ('Name', (1, 6), 'Exception', (' Load',)), [('Str', (1, 16), 'string')], [], None, None), None)]),
973 ('Module', [('Try', (1, 0), [('Pass', (2, 2))], [('ExceptHandler', (3, 0), ('Nam e', (3, 7), 'Exception', ('Load',)), None, [('Pass', (4, 2))])], [], [])]), 989 ('Module', [('Try', (1, 0), [('Pass', (2, 2))], [('ExceptHandler', (3, 0), ('Nam e', (3, 7), 'Exception', ('Load',)), None, [('Pass', (4, 2))])], [], [])]),
974 ('Module', [('Try', (1, 0), [('Pass', (2, 2))], [], [], [('Pass', (4, 2))])]), 990 ('Module', [('Try', (1, 0), [('Pass', (2, 2))], [], [], [('Pass', (4, 2))])]),
975 ('Module', [('Assert', (1, 0), ('Name', (1, 7), 'v', ('Load',)), None)]), 991 ('Module', [('Assert', (1, 0), ('Name', (1, 7), 'v', ('Load',)), None)]),
976 ('Module', [('Import', (1, 0), [('alias', 'sys', None)])]), 992 ('Module', [('Import', (1, 0), [('alias', 'sys', None)])]),
977 ('Module', [('ImportFrom', (1, 0), 'sys', [('alias', 'v', None)], 0)]), 993 ('Module', [('ImportFrom', (1, 0), 'sys', [('alias', 'v', None)], 0)]),
978 ('Module', [('Global', (1, 0), ['v'])]), 994 ('Module', [('Global', (1, 0), ['v'])]),
979 ('Module', [('Expr', (1, 0), ('Num', (1, 0), 1))]), 995 ('Module', [('Expr', (1, 0), ('Num', (1, 0), 1))]),
980 ('Module', [('Pass', (1, 0))]), 996 ('Module', [('Pass', (1, 0))]),
981 ('Module', [('Break', (1, 0))]), 997 ('Module', [('Break', (1, 0))]),
982 ('Module', [('Continue', (1, 0))]), 998 ('Module', [('Continue', (1, 0))]),
983 ('Module', [('For', (1, 0), ('Tuple', (1, 4), [('Name', (1, 4), 'a', ('Store',)) , ('Name', (1, 6), 'b', ('Store',))], ('Store',)), ('Name', (1, 11), 'c', ('Load ',)), [('Pass', (1, 14))], [])]), 999 ('Module', [('For', (1, 0), ('Tuple', (1, 4), [('Name', (1, 4), 'a', ('Store',)) , ('Name', (1, 6), 'b', ('Store',))], ('Store',)), ('Name', (1, 11), 'c', ('Load ',)), [('Pass', (1, 14))], [])]),
984 ('Module', [('Expr', (1, 0), ('ListComp', (1, 1), ('Tuple', (1, 2), [('Name', (1 , 2), 'a', ('Load',)), ('Name', (1, 4), 'b', ('Load',))], ('Load',)), [('compreh ension', ('Tuple', (1, 11), [('Name', (1, 11), 'a', ('Store',)), ('Name', (1, 13 ), 'b', ('Store',))], ('Store',)), ('Name', (1, 18), 'c', ('Load',)), [])]))]), 1000 ('Module', [('Expr', (1, 0), ('ListComp', (1, 1), ('Tuple', (1, 2), [('Name', (1 , 2), 'a', ('Load',)), ('Name', (1, 4), 'b', ('Load',))], ('Load',)), [('compreh ension', ('Tuple', (1, 11), [('Name', (1, 11), 'a', ('Store',)), ('Name', (1, 13 ), 'b', ('Store',))], ('Store',)), ('Name', (1, 18), 'c', ('Load',)), [])]))]),
985 ('Module', [('Expr', (1, 0), ('GeneratorExp', (1, 1), ('Tuple', (1, 2), [('Name' , (1, 2), 'a', ('Load',)), ('Name', (1, 4), 'b', ('Load',))], ('Load',)), [('com prehension', ('Tuple', (1, 11), [('Name', (1, 11), 'a', ('Store',)), ('Name', (1 , 13), 'b', ('Store',))], ('Store',)), ('Name', (1, 18), 'c', ('Load',)), [])])) ]), 1001 ('Module', [('Expr', (1, 0), ('GeneratorExp', (1, 1), ('Tuple', (1, 2), [('Name' , (1, 2), 'a', ('Load',)), ('Name', (1, 4), 'b', ('Load',))], ('Load',)), [('com prehension', ('Tuple', (1, 11), [('Name', (1, 11), 'a', ('Store',)), ('Name', (1 , 13), 'b', ('Store',))], ('Store',)), ('Name', (1, 18), 'c', ('Load',)), [])])) ]),
986 ('Module', [('Expr', (1, 0), ('GeneratorExp', (1, 1), ('Tuple', (1, 2), [('Name' , (1, 2), 'a', ('Load',)), ('Name', (1, 4), 'b', ('Load',))], ('Load',)), [('com prehension', ('Tuple', (1, 12), [('Name', (1, 12), 'a', ('Store',)), ('Name', (1 , 14), 'b', ('Store',))], ('Store',)), ('Name', (1, 20), 'c', ('Load',)), [])])) ]), 1002 ('Module', [('Expr', (1, 0), ('GeneratorExp', (1, 1), ('Tuple', (1, 2), [('Name' , (1, 2), 'a', ('Load',)), ('Name', (1, 4), 'b', ('Load',))], ('Load',)), [('com prehension', ('Tuple', (1, 12), [('Name', (1, 12), 'a', ('Store',)), ('Name', (1 , 14), 'b', ('Store',))], ('Store',)), ('Name', (1, 20), 'c', ('Load',)), [])])) ]),
987 ('Module', [('Expr', (1, 0), ('GeneratorExp', (2, 4), ('Tuple', (3, 4), [('Name' , (3, 4), 'Aa', ('Load',)), ('Name', (5, 7), 'Bb', ('Load',))], ('Load',)), [('c omprehension', ('Tuple', (8, 4), [('Name', (8, 4), 'Aa', ('Store',)), ('Name', ( 10, 4), 'Bb', ('Store',))], ('Store',)), ('Name', (10, 10), 'Cc', ('Load',)), [] )]))]), 1003 ('Module', [('Expr', (1, 0), ('GeneratorExp', (2, 4), ('Tuple', (3, 4), [('Name' , (3, 4), 'Aa', ('Load',)), ('Name', (5, 7), 'Bb', ('Load',))], ('Load',)), [('c omprehension', ('Tuple', (8, 4), [('Name', (8, 4), 'Aa', ('Store',)), ('Name', ( 10, 4), 'Bb', ('Store',))], ('Store',)), ('Name', (10, 10), 'Cc', ('Load',)), [] )]))]),
988 ('Module', [('Expr', (1, 0), ('DictComp', (1, 1), ('Name', (1, 1), 'a', ('Load', )), ('Name', (1, 5), 'b', ('Load',)), [('comprehension', ('Name', (1, 11), 'w', ('Store',)), ('Name', (1, 16), 'x', ('Load',)), []), ('comprehension', ('Name', (1, 22), 'm', ('Store',)), ('Name', (1, 27), 'p', ('Load',)), [('Name', (1, 32), 'g', ('Load',))])]))]), 1004 ('Module', [('Expr', (1, 0), ('DictComp', (1, 1), ('Name', (1, 1), 'a', ('Load', )), ('Name', (1, 5), 'b', ('Load',)), [('comprehension', ('Name', (1, 11), 'w', ('Store',)), ('Name', (1, 16), 'x', ('Load',)), []), ('comprehension', ('Name', (1, 22), 'm', ('Store',)), ('Name', (1, 27), 'p', ('Load',)), [('Name', (1, 32), 'g', ('Load',))])]))]),
989 ('Module', [('Expr', (1, 0), ('DictComp', (1, 1), ('Name', (1, 1), 'a', ('Load', )), ('Name', (1, 5), 'b', ('Load',)), [('comprehension', ('Tuple', (1, 11), [('N ame', (1, 11), 'v', ('Store',)), ('Name', (1, 13), 'w', ('Store',))], ('Store',) ), ('Name', (1, 18), 'x', ('Load',)), [])]))]), 1005 ('Module', [('Expr', (1, 0), ('DictComp', (1, 1), ('Name', (1, 1), 'a', ('Load', )), ('Name', (1, 5), 'b', ('Load',)), [('comprehension', ('Tuple', (1, 11), [('N ame', (1, 11), 'v', ('Store',)), ('Name', (1, 13), 'w', ('Store',))], ('Store',) ), ('Name', (1, 18), 'x', ('Load',)), [])]))]),
990 ('Module', [('Expr', (1, 0), ('SetComp', (1, 1), ('Name', (1, 1), 'r', ('Load',) ), [('comprehension', ('Name', (1, 7), 'l', ('Store',)), ('Name', (1, 12), 'x', ('Load',)), [('Name', (1, 17), 'g', ('Load',))])]))]), 1006 ('Module', [('Expr', (1, 0), ('SetComp', (1, 1), ('Name', (1, 1), 'r', ('Load',) ), [('comprehension', ('Name', (1, 7), 'l', ('Store',)), ('Name', (1, 12), 'x', ('Load',)), [('Name', (1, 17), 'g', ('Load',))])]))]),
991 ('Module', [('Expr', (1, 0), ('SetComp', (1, 1), ('Name', (1, 1), 'r', ('Load',) ), [('comprehension', ('Tuple', (1, 7), [('Name', (1, 7), 'l', ('Store',)), ('Na me', (1, 9), 'm', ('Store',))], ('Store',)), ('Name', (1, 14), 'x', ('Load',)), [])]))]), 1007 ('Module', [('Expr', (1, 0), ('SetComp', (1, 1), ('Name', (1, 1), 'r', ('Load',) ), [('comprehension', ('Tuple', (1, 7), [('Name', (1, 7), 'l', ('Store',)), ('Na me', (1, 9), 'm', ('Store',))], ('Store',)), ('Name', (1, 14), 'x', ('Load',)), [])]))]),
992 ] 1008 ]
993 single_results = [ 1009 single_results = [
994 ('Interactive', [('Expr', (1, 0), ('BinOp', (1, 0), ('Num', (1, 0), 1), ('Add',) , ('Num', (1, 2), 2)))]), 1010 ('Interactive', [('Expr', (1, 0), ('BinOp', (1, 0), ('Num', (1, 0), 1), ('Add',) , ('Num', (1, 2), 2)))]),
995 ] 1011 ]
996 eval_results = [ 1012 eval_results = [
997 ('Expression', ('Name', (1, 0), 'None', ('Load',))), 1013 ('Expression', ('NameConstant', (1, 0), None)),
998 ('Expression', ('BoolOp', (1, 0), ('And',), [('Name', (1, 0), 'a', ('Load',)), ( 'Name', (1, 6), 'b', ('Load',))])), 1014 ('Expression', ('BoolOp', (1, 0), ('And',), [('Name', (1, 0), 'a', ('Load',)), ( 'Name', (1, 6), 'b', ('Load',))])),
999 ('Expression', ('BinOp', (1, 0), ('Name', (1, 0), 'a', ('Load',)), ('Add',), ('N ame', (1, 4), 'b', ('Load',)))), 1015 ('Expression', ('BinOp', (1, 0), ('Name', (1, 0), 'a', ('Load',)), ('Add',), ('N ame', (1, 4), 'b', ('Load',)))),
1000 ('Expression', ('UnaryOp', (1, 0), ('Not',), ('Name', (1, 4), 'v', ('Load',)))), 1016 ('Expression', ('UnaryOp', (1, 0), ('Not',), ('Name', (1, 4), 'v', ('Load',)))),
1001 ('Expression', ('Lambda', (1, 0), ('arguments', [], None, None, [], None, None, [], []), ('Name', (1, 7), 'None', ('Load',)))), 1017 ('Expression', ('Lambda', (1, 0), ('arguments', [], None, [], [], None, []), ('N ameConstant', (1, 7), None))),
1002 ('Expression', ('Dict', (1, 0), [('Num', (1, 2), 1)], [('Num', (1, 4), 2)])), 1018 ('Expression', ('Dict', (1, 0), [('Num', (1, 2), 1)], [('Num', (1, 4), 2)])),
1003 ('Expression', ('Dict', (1, 0), [], [])), 1019 ('Expression', ('Dict', (1, 0), [], [])),
1004 ('Expression', ('Set', (1, 0), [('Name', (1, 1), 'None', ('Load',))])), 1020 ('Expression', ('Set', (1, 0), [('NameConstant', (1, 1), None)])),
1005 ('Expression', ('Dict', (1, 0), [('Num', (2, 6), 1)], [('Num', (4, 10), 2)])), 1021 ('Expression', ('Dict', (1, 0), [('Num', (2, 6), 1)], [('Num', (4, 10), 2)])),
1006 ('Expression', ('ListComp', (1, 1), ('Name', (1, 1), 'a', ('Load',)), [('compreh ension', ('Name', (1, 7), 'b', ('Store',)), ('Name', (1, 12), 'c', ('Load',)), [ ('Name', (1, 17), 'd', ('Load',))])])), 1022 ('Expression', ('ListComp', (1, 1), ('Name', (1, 1), 'a', ('Load',)), [('compreh ension', ('Name', (1, 7), 'b', ('Store',)), ('Name', (1, 12), 'c', ('Load',)), [ ('Name', (1, 17), 'd', ('Load',))])])),
1007 ('Expression', ('GeneratorExp', (1, 1), ('Name', (1, 1), 'a', ('Load',)), [('com prehension', ('Name', (1, 7), 'b', ('Store',)), ('Name', (1, 12), 'c', ('Load',) ), [('Name', (1, 17), 'd', ('Load',))])])), 1023 ('Expression', ('GeneratorExp', (1, 1), ('Name', (1, 1), 'a', ('Load',)), [('com prehension', ('Name', (1, 7), 'b', ('Store',)), ('Name', (1, 12), 'c', ('Load',) ), [('Name', (1, 17), 'd', ('Load',))])])),
1008 ('Expression', ('Compare', (1, 0), ('Num', (1, 0), 1), [('Lt',), ('Lt',)], [('Nu m', (1, 4), 2), ('Num', (1, 8), 3)])), 1024 ('Expression', ('Compare', (1, 0), ('Num', (1, 0), 1), [('Lt',), ('Lt',)], [('Nu m', (1, 4), 2), ('Num', (1, 8), 3)])),
1009 ('Expression', ('Call', (1, 0), ('Name', (1, 0), 'f', ('Load',)), [('Num', (1, 2 ), 1), ('Num', (1, 4), 2)], [('keyword', 'c', ('Num', (1, 8), 3))], ('Name', (1, 11), 'd', ('Load',)), ('Name', (1, 15), 'e', ('Load',)))), 1025 ('Expression', ('Call', (1, 1), ('Name', (1, 0), 'f', ('Load',)), [('Num', (1, 2 ), 1), ('Num', (1, 4), 2)], [('keyword', 'c', ('Num', (1, 8), 3))], ('Name', (1, 11), 'd', ('Load',)), ('Name', (1, 15), 'e', ('Load',)))),
1010 ('Expression', ('Num', (1, 0), 10)), 1026 ('Expression', ('Num', (1, 0), 10)),
1011 ('Expression', ('Str', (1, 0), 'string')), 1027 ('Expression', ('Str', (1, 0), 'string')),
1012 ('Expression', ('Attribute', (1, 0), ('Name', (1, 0), 'a', ('Load',)), 'b', ('Lo ad',))), 1028 ('Expression', ('Attribute', (1, 2), ('Name', (1, 0), 'a', ('Load',)), 'b', ('Lo ad',))),
1013 ('Expression', ('Subscript', (1, 0), ('Name', (1, 0), 'a', ('Load',)), ('Slice', ('Name', (1, 2), 'b', ('Load',)), ('Name', (1, 4), 'c', ('Load',)), None), ('Lo ad',))), 1029 ('Expression', ('Subscript', (1, 2), ('Name', (1, 0), 'a', ('Load',)), ('Slice', ('Name', (1, 2), 'b', ('Load',)), ('Name', (1, 4), 'c', ('Load',)), None), ('Lo ad',))),
1014 ('Expression', ('Name', (1, 0), 'v', ('Load',))), 1030 ('Expression', ('Name', (1, 0), 'v', ('Load',))),
1015 ('Expression', ('List', (1, 0), [('Num', (1, 1), 1), ('Num', (1, 3), 2), ('Num', (1, 5), 3)], ('Load',))), 1031 ('Expression', ('List', (1, 0), [('Num', (1, 1), 1), ('Num', (1, 3), 2), ('Num', (1, 5), 3)], ('Load',))),
1016 ('Expression', ('List', (1, 0), [], ('Load',))), 1032 ('Expression', ('List', (1, 0), [], ('Load',))),
1017 ('Expression', ('Tuple', (1, 0), [('Num', (1, 0), 1), ('Num', (1, 2), 2), ('Num' , (1, 4), 3)], ('Load',))), 1033 ('Expression', ('Tuple', (1, 0), [('Num', (1, 0), 1), ('Num', (1, 2), 2), ('Num' , (1, 4), 3)], ('Load',))),
1018 ('Expression', ('Tuple', (1, 1), [('Num', (1, 1), 1), ('Num', (1, 3), 2), ('Num' , (1, 5), 3)], ('Load',))), 1034 ('Expression', ('Tuple', (1, 1), [('Num', (1, 1), 1), ('Num', (1, 3), 2), ('Num' , (1, 5), 3)], ('Load',))),
1019 ('Expression', ('Tuple', (1, 0), [], ('Load',))), 1035 ('Expression', ('Tuple', (1, 0), [], ('Load',))),
1020 ('Expression', ('Call', (1, 0), ('Attribute', (1, 0), ('Attribute', (1, 0), ('At tribute', (1, 0), ('Name', (1, 0), 'a', ('Load',)), 'b', ('Load',)), 'c', ('Load ',)), 'd', ('Load',)), [('Subscript', (1, 8), ('Attribute', (1, 8), ('Name', (1, 8), 'a', ('Load',)), 'b', ('Load',)), ('Slice', ('Num', (1, 12), 1), ('Num', (1 , 14), 2), None), ('Load',))], [], None, None)), 1036 ('Expression', ('Call', (1, 7), ('Attribute', (1, 6), ('Attribute', (1, 4), ('At tribute', (1, 2), ('Name', (1, 0), 'a', ('Load',)), 'b', ('Load',)), 'c', ('Load ',)), 'd', ('Load',)), [('Subscript', (1, 12), ('Attribute', (1, 10), ('Name', ( 1, 8), 'a', ('Load',)), 'b', ('Load',)), ('Slice', ('Num', (1, 12), 1), ('Num', (1, 14), 2), None), ('Load',))], [], None, None)),
1021 ] 1037 ]
1022 main() 1038 main()
LEFTRIGHT

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+