summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Behnel <stefan_ml@behnel.de>2019-03-15 10:12:16 +0100
committerStefan Behnel <stefan_ml@behnel.de>2019-03-15 10:13:14 +0100
commit82c8d29792e85c8d2bae6844ba1785d809730f77 (patch)
tree12348b960be891f8135e88e6c6ee9aed27dd7b30
parentf9ab976c18549eb6e725c8c4a83a54fb9e93fb6a (diff)
downloadcython-82c8d29792e85c8d2bae6844ba1785d809730f77.tar.gz
Improve error message if assertion fails.
-rw-r--r--Cython/Compiler/ExprNodes.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/Cython/Compiler/ExprNodes.py b/Cython/Compiler/ExprNodes.py
index ec864f5f1..c4571ad33 100644
--- a/Cython/Compiler/ExprNodes.py
+++ b/Cython/Compiler/ExprNodes.py
@@ -13020,9 +13020,10 @@ class PyTypeTestNode(CoercionNode):
exact_builtin_type = True
def __init__(self, arg, dst_type, env, notnone=False):
- # The arg is know to be a Python object, and
+ # The arg is known to be a Python object, and
# the dst_type is known to be an extension type.
- assert dst_type.is_extension_type or dst_type.is_builtin_type, "PyTypeTest on non extension type"
+ assert dst_type.is_extension_type or dst_type.is_builtin_type, \
+ "PyTypeTest on non extension type %s" % dst_type
CoercionNode.__init__(self, arg)
self.type = dst_type
self.result_ctype = arg.ctype()