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