[issue45058] Undefined behavior for syntax "except AError or BError:" accepted by interpreter
kftse added the comment: Tested 3.9.6 to have same behavior as 3.8.0. to clarify, I suppose legal merely means syntactically correct, not effect of "except AError or BError:" === "except (AError, BError)" right? -- ___ Py
[issue45058] Undefined behavior for syntax "except AError or BError:" accepted by interpreter
New submission from kftse : Test case: try: raise TypeError() except TypeError or ValueError: print("OK") try: raise ValueError() except TypeError or ValueError: print("OK") Output: (Python 3.9.0) OK OK # seem to eventually lead to segmentation fault els