Author: walter.doerwald
Date: Mon Jun 11 17:00:18 2007
New Revision: 55893

Modified:
   python/branches/py3k-struni/Objects/funcobject.c
Log:
Simplify error formatting (no default encoding required).


Modified: python/branches/py3k-struni/Objects/funcobject.c
==============================================================================
--- python/branches/py3k-struni/Objects/funcobject.c    (original)
+++ python/branches/py3k-struni/Objects/funcobject.c    Mon Jun 11 17:00:18 2007
@@ -515,9 +515,8 @@
        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++) {
_______________________________________________
Python-3000-checkins mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-3000-checkins

Reply via email to