From d81e97e9dc0ad755c5fe837dbc7899567128dcf2 Mon Sep 17 00:00:00 2001 From: Stefan Behnel Date: Sun, 14 Mar 2010 12:42:47 +0100 Subject: [PATCH] fix for cython.set in Py3 (again) --- Cython/Shadow.py | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/Cython/Shadow.py b/Cython/Shadow.py index 323fcec3..ef058602 100644 --- a/Cython/Shadow.py +++ b/Cython/Shadow.py @@ -161,18 +161,14 @@ except NameError: # Py3 py_long = int try: - import __builtin__ + try: + from __builtin__ import set + except AttributeError: + # Py 2.3 + from sets import Set as set 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__ + from builtins import set # Predefined types -- 2.26.2