From: Stefan Behnel Date: Tue, 12 Aug 2008 19:24:39 +0000 (+0200) Subject: applied Py3 exception format patch by Lisandro X-Git-Tag: 0.9.8.1~53 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=0227fc22e962f713bcbe889a6fc70ce4f3819157;p=cython.git applied Py3 exception format patch by Lisandro --- diff --git a/Cython/Compiler/Nodes.py b/Cython/Compiler/Nodes.py index 266fc4d6..555e3fd2 100644 --- a/Cython/Compiler/Nodes.py +++ b/Cython/Compiler/Nodes.py @@ -4274,11 +4274,12 @@ static int __Pyx_CheckKeywordStrings( } if (unlikely(!kw_allowed) && unlikely(key)) { PyErr_Format(PyExc_TypeError, - "'%s' is an invalid keyword argument for this function", #if PY_MAJOR_VERSION < 3 + "'%s' is an invalid keyword argument for this function", PyString_AsString(key)); #else - PyUnicode_AsString(key)); + "'%U' is an invalid keyword argument for this function", + key); #endif return 0; }