New submission from Andre Roberge <andre.robe...@gmail.com>:

The following:

try:
    pass
except ValueError, NameError as err:
    pass

results in:

    except ValueError, NameError as err:
                     ^
SyntaxError: expected ':'

However, what is missing here are some parentheses surrounding the exception 
types.

----------
messages: 386570
nosy: aroberge
priority: normal
severity: normal
status: open
title: Misleading error message for except with missing parens (3.10.a5)
type: behavior
versions: Python 3.10

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue43149>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to