From 3ace2e41e3a3d7829810cf4b1a6cac916d25a937 Mon Sep 17 00:00:00 2001 From: Stefan Behnel Date: Sun, 14 Mar 2010 12:34:02 +0100 Subject: [PATCH] fix for cython.set in Py3 --- Cython/Shadow.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Cython/Shadow.py b/Cython/Shadow.py index 6b638d73..323fcec3 100644 --- a/Cython/Shadow.py +++ b/Cython/Shadow.py @@ -161,11 +161,18 @@ except NameError: # Py3 py_long = int try: - set = __builtins__.set + import __builtin__ +except ImportError: + # Python 3 + import builtins as __builtin__ + +try: + set = __builtin__.set except AttributeError: # Py 2.3 from sets import Set as set +del __builtin__ # Predefined types -- 2.26.2