From 2e99b2363cc909943489383b1f1687c64037e65a Mon Sep 17 00:00:00 2001 From: Robert Bradshaw Date: Sat, 11 Dec 2010 02:31:25 -0800 Subject: [PATCH] another fix --- Cython/Shadow.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/Cython/Shadow.py b/Cython/Shadow.py index 0e22be6b..ddfb3fc5 100644 --- a/Cython/Shadow.py +++ b/Cython/Shadow.py @@ -190,10 +190,15 @@ py_complex = complex try: - set -except NameError: - # Python 2.3 - from sets import Set as set, ImmutableSet as frozenset + # Python 3 + from builtins import set, frozenset +except ImportError: + try: + # Python 2.4+ + from __builtin__ import set, frozenset + except ImportError: + # Py 2.3 + from sets import Set as set, ImmutableSet as frozenset # Predefined types -- 2.26.2