try_module.py 298 B

123456789101112131415
  1. # Regression test for #290 - throwing exception in another module led to
  2. # its namespace stick and namespace of current module not coming back.
  3. import import1b
  4. def func1():
  5. print('func1')
  6. def func2():
  7. try:
  8. import1b.throw()
  9. except ValueError:
  10. pass
  11. func1()
  12. func2()