summaryrefslogtreecommitdiffstats
path: root/Python/symtable.c
diff options
context:
space:
mode:
authorNeal Norwitz <nnorwitz@gmail.com>2007-08-24 22:53:58 (GMT)
committerNeal Norwitz <nnorwitz@gmail.com>2007-08-24 22:53:58 (GMT)
commita5d16a3f855540a0d67a8bd3ff6927455ed7a8b5 (patch)
tree89ffec2d23fc8ffe472731cc3d87268348b586e3 /Python/symtable.c
parent808c7d86ea07a91c416f0844f4fc95a0c996001c (diff)
downloadcpython-a5d16a3f855540a0d67a8bd3ff6927455ed7a8b5.zip
cpython-a5d16a3f855540a0d67a8bd3ff6927455ed7a8b5.tar.gz
cpython-a5d16a3f855540a0d67a8bd3ff6927455ed7a8b5.tar.bz2
Use unicode for error messages of duplicate args
Diffstat (limited to 'Python/symtable.c')
-rw-r--r--Python/symtable.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/Python/symtable.c b/Python/symtable.c
index 47fdad2..59eef02 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;