diff options
author | Walter Dörwald <walter@livinglogic.de> | 2007-06-11 15:00:18 (GMT) |
---|---|---|
committer | Walter Dörwald <walter@livinglogic.de> | 2007-06-11 15:00:18 (GMT) |
commit | a29d1d7ff57e1e373c94a6423e16da0c4ec524f2 (patch) | |
tree | ae6357f19873f499290107ba430d049ee5244408 /Objects/funcobject.c | |
parent | 7815c5e91e22a7f6dfb6b64357d25982f91ea46e (diff) | |
download | cpython-a29d1d7ff57e1e373c94a6423e16da0c4ec524f2.zip cpython-a29d1d7ff57e1e373c94a6423e16da0c4ec524f2.tar.gz cpython-a29d1d7ff57e1e373c94a6423e16da0c4ec524f2.tar.bz2 |
Simplify error formatting (no default encoding required).
Diffstat (limited to 'Objects/funcobject.c')
-rw-r--r-- | Objects/funcobject.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/Objects/funcobject.c b/Objects/funcobject.c index ff1b4c8..343e67c 100644 --- a/Objects/funcobject.c +++ b/Objects/funcobject.c @@ -515,9 +515,8 @@ func_new(PyTypeObject* type, PyObject* args, PyObject* kw) nclosure = closure == Py_None ? 0 : PyTuple_GET_SIZE(closure); if (nfree != nclosure) return PyErr_Format(PyExc_ValueError, - "%s requires closure of length %zd, not %zd", - PyUnicode_AsString(code->co_name), - nfree, nclosure); + "%U requires closure of length %zd, not %zd", + code->co_name, nfree, nclosure); if (nclosure) { Py_ssize_t i; for (i = 0; i < nclosure; i++) { |