From: Stefan Behnel Date: Sun, 14 Mar 2010 11:34:02 +0000 (+0100) Subject: fix for cython.set in Py3 X-Git-Tag: 0.13.beta0~294 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=3ace2e41e3a3d7829810cf4b1a6cac916d25a937;p=cython.git fix for cython.set in Py3 --- 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