1# Reraising last exception with raise w/o args 2 3def f(): 4 try: 5 raise ValueError("val", 3) 6 except: 7 raise 8 9try: 10 f() 11except ValueError as e: 12 print(repr(e)) 13 14 15# Can reraise only in except block 16try: 17 raise 18except RuntimeError: 19 print("RuntimeError") 20