blob: 6ab1ac1a177345f4eb4be44fcd17f95ea94dfdb7 [file] [log] [blame]
Tor Norbye3a2425a52013-11-04 10:16:08 -08001class F(Exception):
2 def foo(self):
3 raise self
4
5try:
6 F().foo()
7except BaseException:
8 print("BaseException")
9except <warning descr="'BaseException', superclass of exception class 'Exception', has already been caught">Exception</warning>:
10 print("Exception")
11
12try:
13 pass
14except Exception as e:
15 pass
16except <warning descr="Exception class 'Exception' has already been caught">Exception</warning> as ex:
17 pass