From 7072be52683e450b9fafd16b0cda604b496a84b6 Mon Sep 17 00:00:00 2001 From: Stefan Behnel Date: Sun, 14 Mar 2010 12:22:37 +0100 Subject: [PATCH] provide 'set' builtin type in 'cython' namespace to make it available in Py2.3 --- Cython/Compiler/ParseTreeTransforms.py | 4 ++++ 1 file changed, 4 insertions(+) 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) -- 2.26.2