From 0227fc22e962f713bcbe889a6fc70ce4f3819157 Mon Sep 17 00:00:00 2001 From: Stefan Behnel Date: Tue, 12 Aug 2008 21:24:39 +0200 Subject: [PATCH] applied Py3 exception format patch by Lisandro --- Cython/Compiler/Nodes.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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; } -- 2.26.2