t333.trans 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. Module(body=[Assign(targets=[Name(id='x',
  2. ctx=Store())],
  3. value=Str(s='Please make startswith and endswith work')),
  4. If(test=Call(func=Attribute(value=Name(id='x',
  5. ctx=Load()),
  6. attr='startswith',
  7. ctx=Load()),
  8. args=[Str(s='Please')],
  9. keywords=[],
  10. starargs=None,
  11. kwargs=None),
  12. body=[Print(dest=None,
  13. values=[Str(s='Starts with Please')],
  14. nl=True)],
  15. orelse=[Print(dest=None,
  16. values=[Str(s='Not good')],
  17. nl=True)]),
  18. If(test=Call(func=Attribute(value=Name(id='x',
  19. ctx=Load()),
  20. attr='endswith',
  21. ctx=Load()),
  22. args=[Str(s='work')],
  23. keywords=[],
  24. starargs=None,
  25. kwargs=None),
  26. body=[Print(dest=None,
  27. values=[Str(s='Ends with work')],
  28. nl=True)],
  29. orelse=[Print(dest=None,
  30. values=[Str(s='Not good')],
  31. nl=True)]),
  32. If(test=Call(func=Attribute(value=Name(id='x',
  33. ctx=Load()),
  34. attr='startswith',
  35. ctx=Load()),
  36. args=[Str(s='please')],
  37. keywords=[],
  38. starargs=None,
  39. kwargs=None),
  40. body=[Print(dest=None,
  41. values=[Str(s='Not good')],
  42. nl=True)],
  43. orelse=[Print(dest=None,
  44. values=[Str(s='Does not start with please')],
  45. nl=True)]),
  46. If(test=Call(func=Attribute(value=Name(id='x',
  47. ctx=Load()),
  48. attr='endswith',
  49. ctx=Load()),
  50. args=[Str(s='please')],
  51. keywords=[],
  52. starargs=None,
  53. kwargs=None),
  54. body=[Print(dest=None,
  55. values=[Str(s='Not good')],
  56. nl=True)],
  57. orelse=[Print(dest=None,
  58. values=[Str(s='Does not end with please')],
  59. nl=True)])])