mirror of
https://github.com/python/cpython.git
synced 2025-07-08 03:45:36 +00:00
gh-133379: Fix misuse of the term "arguments" in error messages (GH-133382)
The right term is "parameters".
This commit is contained in:
parent
f28cbc9fd3
commit
dbca27cfca
10 changed files with 72 additions and 68 deletions
|
@ -380,8 +380,8 @@ static void dump_symtable(PySTEntryObject* ste)
|
|||
}
|
||||
#endif
|
||||
|
||||
#define DUPLICATE_ARGUMENT \
|
||||
"duplicate argument '%U' in function definition"
|
||||
#define DUPLICATE_PARAMETER \
|
||||
"duplicate parameter '%U' in function definition"
|
||||
|
||||
static struct symtable *
|
||||
symtable_new(void)
|
||||
|
@ -1494,7 +1494,7 @@ symtable_add_def_helper(struct symtable *st, PyObject *name, int flag, struct _s
|
|||
}
|
||||
if ((flag & DEF_PARAM) && (val & DEF_PARAM)) {
|
||||
/* Is it better to use 'mangled' or 'name' here? */
|
||||
PyErr_Format(PyExc_SyntaxError, DUPLICATE_ARGUMENT, name);
|
||||
PyErr_Format(PyExc_SyntaxError, DUPLICATE_PARAMETER, name);
|
||||
SET_ERROR_LOCATION(st->st_filename, loc);
|
||||
goto error;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue