New submission from Pablo Galindo Salgado <pablogsal@gmail.com>:
This got me confused for a sec when doing some live demo:
>>> match x:
... case A(y=1, foo):
File "<stdin>", line 2
case A(y=1, foo):
^
SyntaxError: invalid syntax
I propose to improve this to:
>>> match x:
... case A(y=1, foo):
File "<stdin>", line 2
case A(y=1, foo):
^^^
SyntaxError: cannot mix keyword patterns and positional patterns
----------
messages: 396088
nosy: brandtbucher, pablogsal
priority: normal
severity: normal
status: open
title: Improve syntax error for mixing keyword/positional in max patterns
_______________________________________
Python tracker <report@bugs.python.org>
<https://bugs.python.org/issue44456>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com
This got me confused for a sec when doing some live demo:
>>> match x:
... case A(y=1, foo):
File "<stdin>", line 2
case A(y=1, foo):
^
SyntaxError: invalid syntax
I propose to improve this to:
>>> match x:
... case A(y=1, foo):
File "<stdin>", line 2
case A(y=1, foo):
^^^
SyntaxError: cannot mix keyword patterns and positional patterns
----------
messages: 396088
nosy: brandtbucher, pablogsal
priority: normal
severity: normal
status: open
title: Improve syntax error for mixing keyword/positional in max patterns
_______________________________________
Python tracker <report@bugs.python.org>
<https://bugs.python.org/issue44456>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com