Re: [Python-Dev] [Python-checkins] cpython (3.5): remove extra PyErr_Format arguments (closes #28454)

On Sun, Oct 16, 2016 at 4:42 PM, benjamin.peterson python-checkins@python.org wrote:
--- a/Objects/unicodeobject.c +++ b/Objects/unicodeobject.c @@ -3009,7 +3009,7 @@ "'%.400s' decoder returned '%.400s' instead of 'str'; " "use codecs.decode() to decode to arbitrary types", encoding,
Py_TYPE(unicode)->tp_name, Py_TYPE(unicode)->tp_name);
}Py_TYPE(unicode)->tp_name); Py_DECREF(unicode); goto onError;
Um, isn't that now an error? There are 2 format sequences, but only 1 argument.

On Mon, Oct 17, 2016 at 12:43 PM, Jeremy Kloth jeremy.kloth@gmail.com wrote:
On Sun, Oct 16, 2016 at 4:42 PM, benjamin.peterson python-checkins@python.org wrote:
--- a/Objects/unicodeobject.c +++ b/Objects/unicodeobject.c @@ -3009,7 +3009,7 @@ "'%.400s' decoder returned '%.400s' instead of 'str'; " "use codecs.decode() to decode to arbitrary types", encoding,
Py_TYPE(unicode)->tp_name, Py_TYPE(unicode)->tp_name);
}Py_TYPE(unicode)->tp_name); Py_DECREF(unicode); goto onError;
Um, isn't that now an error? There are 2 format sequences, but only 1 argument.
Hi Jeremy,
It doesn't look like an error to me. The first argument is 'encoding' and the second one is 'Py_TYPE(unicode)->tp_name'.
--Berker

Oops, you are right. Silly little comma...
participants (2)
-
Berker Peksağ
-
Jeremy Kloth