-
- Notifications
You must be signed in to change notification settings - Fork 33.1k
Closed
Labels
stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
>>> def function(duplicate, duplicate): ... pass # Expected error message: SyntaxError: duplicate argument 'duplicate' in function definition # Actual error message: SyntaxError: incomplete input
>>> def global_and_parameter(argument, /): ... global argument # It may not be clear for less experienced coders # that a name cannot be global and parameter SyntaxError: incomplete input # However when executed with exec(): SyntaxError: name 'argument' is parameter and global
Linked PRs
- gh-111366: Correctly show custom syntax error messages in the codeop module functions #111384
- [3.11] gh-111366: Correctly show custom syntax error messages in the codeop module functions (GH-111384). #111516
- [3.12] gh-111366: Correctly show custom syntax error messages in the codeop module functions (GH-111384). #111517
Metadata
Metadata
Assignees
Labels
stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error