# test errors from bad operations (unary, binary, etc)deftest_exc(code,exc):try:exec(code)print("no exception")exceptexc:print("right exception")except:print("wrong exception")# object with buffer protocol needed on rhstry:(1<<70)in1exceptTypeError:print('TypeError')