fix for cython.set in Py3
authorStefan Behnel <scoder@users.berlios.de>
Sun, 14 Mar 2010 11:34:02 +0000 (12:34 +0100)
committerStefan Behnel <scoder@users.berlios.de>
Sun, 14 Mar 2010 11:34:02 +0000 (12:34 +0100)
Cython/Shadow.py

index 6b638d73c2deaaa0fa588792dd42107e2f7f942c..323fcec3987d0a147ddf623706d337cbf547551b 100644 (file)
@@ -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