Guest User

Untitled

a guest
Jul 9th, 2021
163
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.32 KB | None | 0 0
  1. class A(object):
  2.     def do_nothing(self):
  3.         return self
  4.  
  5.     def fail(self, t=None):
  6.         raise RuntimeError('fail')
  7.  
  8.  
  9. def main():
  10.     a = A()
  11.  
  12.     (a
  13.         .do_nothing()
  14.         .do_nothing()
  15.         .fail()
  16.         .fail()
  17.         .do_nothing()
  18.     )
  19.  
  20.  
  21. if __name__ == '__main__':
  22.     main()
Advertisement
Add Comment
Please, Sign In to add comment