Skip to content

Commit 74ea7f6

Browse files
committed
gh-129545 Enhance error messages
1 parent f996904 commit 74ea7f6

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

Lib/test/test_syntax.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -394,12 +394,12 @@
394394
>>> def f(x, y=1, z):
395395
... pass
396396
Traceback (most recent call last):
397-
SyntaxError: parameter without a default follows parameter with a default
397+
SyntaxError: positional parameter without a default follows parameter with a default
398398
399399
>>> def f(x, /, y=1, z):
400400
... pass
401401
Traceback (most recent call last):
402-
SyntaxError: parameter without a default follows parameter with a default
402+
SyntaxError: positional parameter without a default follows parameter with a default
403403
404404
>>> def f(x, None):
405405
... pass
@@ -622,11 +622,11 @@
622622
623623
>>> lambda a,d=3,c: None
624624
Traceback (most recent call last):
625-
SyntaxError: parameter without a default follows parameter with a default
625+
SyntaxError: positional parameter without a default follows parameter with a default
626626
627627
>>> lambda a,/,d=3,c: None
628628
Traceback (most recent call last):
629-
SyntaxError: parameter without a default follows parameter with a default
629+
SyntaxError: positional parameter without a default follows parameter with a default
630630
631631
>>> import ast; ast.parse('''
632632
... def f(

Parser/parser.c

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)