t148.trans 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. Module(body=[ClassDef(name='Test',
  2. bases=[],
  3. body=[FunctionDef(name='__init__',
  4. args=arguments(args=[Name(id='self',
  5. ctx=Param()),
  6. Name(id='v',
  7. ctx=Param())],
  8. vararg=None,
  9. kwarg=None,
  10. defaults=[]),
  11. body=[Assign(targets=[Attribute(value=Name(id='self',
  12. ctx=Load()),
  13. attr='value',
  14. ctx=Store())],
  15. value=Name(id='v',
  16. ctx=Load()))],
  17. decorator_list=[]),
  18. FunctionDef(name='__call__',
  19. args=arguments(args=[Name(id='self',
  20. ctx=Param())],
  21. vararg=None,
  22. kwarg=None,
  23. defaults=[]),
  24. body=[Print(dest=None,
  25. values=[Attribute(value=Name(id='self',
  26. ctx=Load()),
  27. attr='value',
  28. ctx=Load())],
  29. nl=True)],
  30. decorator_list=[])],
  31. decorator_list=[]),
  32. Assign(targets=[Name(id='x',
  33. ctx=Store())],
  34. value=Call(func=Name(id='Test',
  35. ctx=Load()),
  36. args=[Str(s='OK')],
  37. keywords=[],
  38. starargs=None,
  39. kwargs=None)),
  40. Expr(value=Call(func=Name(id='x',
  41. ctx=Load()),
  42. args=[],
  43. keywords=[],
  44. starargs=None,
  45. kwargs=None))])