[New-bugs-announce] [issue47054] "SyntaxError: non-default argument follows default argument" should be "parameter"

Bluenix report at bugs.python.org
Thu Mar 17 21:17:42 EDT 2022


New submission from Bluenix <bluenixdev at gmail.com>:

Running the code below will produce a SyntaxError with the message: "non-default argument follows default argument".

    def test(a=None, b):
        return b if a is None else a

The issue is that `a` and `b` aren't *arguments*, rather, they are *parameters*. The error message should be changed to: "non-default parameter follows default parameter".

This change appears simple enough and although it is not something I've found to be troublesome, it will help users to use correct keywords (arguments vs. parameters) when searching on the internet.

----------
components: Interpreter Core
messages: 415463
nosy: Bluenix2
priority: normal
severity: normal
status: open
title: "SyntaxError: non-default argument follows default argument" should be "parameter"
versions: Python 3.10, Python 3.7, Python 3.8, Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue47054>
_______________________________________


More information about the New-bugs-announce mailing list