]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-45764: improve error message when missing '(' after 'def' (GH-29484)
authorCarl Friedrich Bolz-Tereick <cfbolz@gmx.de>
Tue, 9 Nov 2021 14:03:32 +0000 (15:03 +0100)
committerGitHub <noreply@github.com>
Tue, 9 Nov 2021 14:03:32 +0000 (06:03 -0800)
commit2819e98d1048238bf94dc2ba88ae2455d01861bc
tree3c6e0d26fd6dd869a17ac148299b824531c48174
parentf4c03484da59049eb62a9bf7777b963e2267d187
bpo-45764: improve error message when missing '(' after 'def' (GH-29484)

to achieve this, change the grammar to expect the '(' token after 'def' NAME.

Automerge-Triggered-By: GH:pablogsal
Grammar/python.gram
Lib/test/test_syntax.py
Misc/NEWS.d/next/Core and Builtins/2021-11-09-12-19-22.bpo-45764.8RLhWL.rst [new file with mode: 0644]
Parser/parser.c