[issue44456] Improve syntax error for mixing keyword/positional in max patterns

Pablo Galindo Salgado report at bugs.python.org
Fri Jun 18 17:14:02 EDT 2021


Pablo Galindo Salgado <pablogsal at gmail.com> added the comment:

If this is supposed to mirror function calls, maybe the error should be::

>>> match a:
...    case A(foo=3, t):
  File "<stdin>", line 2
    case A(foo=3, t):
                  ^
SyntaxError: positional patterns follow keyword patterns

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44456>
_______________________________________


More information about the Python-bugs-list mailing list