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

2021-06-24 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___ Python-bugs-l

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

2021-06-24 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- resolution: -> fixed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: ht

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

2021-06-24 Thread miss-islington
miss-islington added the comment: New changeset 11f1a30cdb59f9da0209798d2057f7afacbd9547 by Miss Islington (bot) in branch '3.10': bpo-44456: Improve the syntax error when mixing keyword and positional patterns (GH-26793) https://github.com/python/cpython/commit/11f1a30cdb59f9da0209798d2057f

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

2021-06-24 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 2.0 -> 3.0 pull_requests: +25476 pull_request: https://github.com/python/cpython/pull/26900 ___ Python tracker _

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

2021-06-24 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset 0acc258fe6f0ec200ca2f6f9294adbf52a244802 by Pablo Galindo in branch 'main': bpo-44456: Improve the syntax error when mixing keyword and positional patterns (GH-26793) https://github.com/python/cpython/commit/0acc258fe6f0ec200ca2f6f9294ad

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

2021-06-18 Thread Brandt Bucher
Brandt Bucher added the comment: Yep, it's intentional. And yep, I like the new error message better. :) -- ___ Python tracker ___ ___

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

2021-06-18 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: If this is supposed to mirror function calls, maybe the error should be:: >>> match a: ...case A(foo=3, t): File "", line 2 case A(foo=3, t): ^ SyntaxError: positional patterns follow keyword patterns -- ___

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

2021-06-18 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Btw, I noticed this is allowed: >>> match x: ...case A(foo, t=3): ...... ... but this is not: >>> match x: ...case A(foo=3, t): Is that on pourpose? -- ___ Python tracker

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

2021-06-18 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- keywords: +patch pull_requests: +25377 stage: -> patch review pull_request: https://github.com/python/cpython/pull/26793 ___ Python tracker __

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

2021-06-18 Thread Pablo Galindo Salgado
New submission from Pablo Galindo Salgado : This got me confused for a sec when doing some live demo: >>> match x: ...case A(y=1, foo): File "", line 2 case A(y=1, foo): ^ SyntaxError: invalid syntax I propose to improve this to: >>> match x: ...case A(y=1, fo