diff options
author | Neal Norwitz <nnorwitz@gmail.com> | 2007-08-24 22:53:58 +0000 |
---|---|---|
committer | Neal Norwitz <nnorwitz@gmail.com> | 2007-08-24 22:53:58 +0000 |
commit | f288580ed77878f182061ff94f681bf0754e281c (patch) | |
tree | 5ba9d681a9b117db519d0b9dea33e919b920d177 /Python/symtable.c | |
parent | a70cb68e923daf3e81235113ae3480ec4a6dff51 (diff) | |
download | cpython-f288580ed77878f182061ff94f681bf0754e281c.tar.gz |
Use unicode for error messages of duplicate args
Diffstat (limited to 'Python/symtable.c')
-rw-r--r-- | Python/symtable.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/Python/symtable.c b/Python/symtable.c index 47fdad22f1..59eef02c74 100644 --- a/Python/symtable.c +++ b/Python/symtable.c @@ -189,7 +189,7 @@ static identifier top = NULL, lambda = NULL, genexpr = NULL, ((VAR) ? (VAR) : ((VAR) = PyUnicode_InternFromString(# VAR))) #define DUPLICATE_ARGUMENT \ -"duplicate argument '%s' in function definition" +"duplicate argument '%U' in function definition" static struct symtable * symtable_new(void) @@ -868,8 +868,7 @@ symtable_add_def(struct symtable *st, PyObject *name, int flag) val = PyInt_AS_LONG(o); if ((flag & DEF_PARAM) && (val & DEF_PARAM)) { /* Is it better to use 'mangled' or 'name' here? */ - PyErr_Format(PyExc_SyntaxError, DUPLICATE_ARGUMENT, - PyString_AsString(name)); + PyErr_Format(PyExc_SyntaxError, DUPLICATE_ARGUMENT, name); PyErr_SyntaxLocation(st->st_filename, st->st_cur->ste_lineno); goto error; |