From: Stefan Behnel Date: Sat, 5 Dec 2009 16:25:17 +0000 (+0100) Subject: fix copy+paste error messages X-Git-Tag: 0.12.1~84 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=98216596c8ba9bbb755b9af4926967da7d5c5236;p=cython.git fix copy+paste error messages --- diff --git a/Cython/Compiler/ParseTreeTransforms.py b/Cython/Compiler/ParseTreeTransforms.py index c65a30b5..8abbd76b 100644 --- a/Cython/Compiler/ParseTreeTransforms.py +++ b/Cython/Compiler/ParseTreeTransforms.py @@ -990,7 +990,7 @@ class TransformBuiltinMethods(EnvTransform): if function: if function == u'cast': if len(node.args) != 2: - error(node.function.pos, u"cast takes exactly two arguments") + error(node.function.pos, u"cast() takes exactly two arguments") else: type = node.args[0].analyse_as_type(self.env_stack[-1]) if type: @@ -999,7 +999,7 @@ class TransformBuiltinMethods(EnvTransform): error(node.args[0].pos, "Not a type") elif function == u'sizeof': if len(node.args) != 1: - error(node.function.pos, u"sizeof takes exactly one argument" % function) + error(node.function.pos, u"sizeof() takes exactly one argument" % function) else: type = node.args[0].analyse_as_type(self.env_stack[-1]) if type: @@ -1008,23 +1008,23 @@ class TransformBuiltinMethods(EnvTransform): node = SizeofVarNode(node.function.pos, operand=node.args[0]) elif function == 'typeof': if len(node.args) != 1: - error(node.function.pos, u"sizeof takes exactly one argument" % function) + error(node.function.pos, u"typeof() takes exactly one argument" % function) else: node = TypeofNode(node.function.pos, operand=node.args[0]) elif function == 'address': if len(node.args) != 1: - error(node.function.pos, u"sizeof takes exactly one argument" % function) + error(node.function.pos, u"address() takes exactly one argument" % function) else: node = AmpersandNode(node.function.pos, operand=node.args[0]) elif function == 'cmod': if len(node.args) != 2: - error(node.function.pos, u"cmod takes exactly one argument" % function) + error(node.function.pos, u"cmod() takes exactly one argument" % function) else: node = binop_node(node.function.pos, '%', node.args[0], node.args[1]) node.cdivision = True elif function == 'cdiv': if len(node.args) != 2: - error(node.function.pos, u"cmod takes exactly one argument" % function) + error(node.function.pos, u"cdiv() takes exactly one argument" % function) else: node = binop_node(node.function.pos, '/', node.args[0], node.args[1]) node.cdivision = True