From: Stefan Behnel Date: Sun, 14 Mar 2010 11:22:37 +0000 (+0100) Subject: provide 'set' builtin type in 'cython' namespace to make it available in Py2.3 X-Git-Tag: 0.13.beta0~296 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=7072be52683e450b9fafd16b0cda604b496a84b6;p=cython.git provide 'set' builtin type in 'cython' namespace to make it available in Py2.3 --- diff --git a/Cython/Compiler/ParseTreeTransforms.py b/Cython/Compiler/ParseTreeTransforms.py index d6cbd5c5..1f1f4753 100644 --- a/Cython/Compiler/ParseTreeTransforms.py +++ b/Cython/Compiler/ParseTreeTransforms.py @@ -1260,6 +1260,8 @@ class TransformBuiltinMethods(EnvTransform): node = BoolNode(node.pos, value=True) elif attribute == u'NULL': node = NullNode(node.pos) + elif attribute == u'set': + node = NameNode(node.pos, name=EncodedString('set')) elif not PyrexTypes.parse_basic_type(attribute): error(node.pos, u"'%s' not a valid cython attribute or is being used incorrectly" % attribute) return node @@ -1321,6 +1323,8 @@ class TransformBuiltinMethods(EnvTransform): else: node = binop_node(node.function.pos, '/', node.args[0], node.args[1]) node.cdivision = True + elif function == u'set': + node.function = NameNode(node.pos, name=EncodedString('set')) else: error(node.function.pos, u"'%s' not a valid cython language construct" % function)