projects
/
cython.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0c7af76
)
another fix
author
Robert Bradshaw
<robertwb@math.washington.edu>
Sat, 11 Dec 2010 10:31:25 +0000
(
02:31
-0800)
committer
Robert Bradshaw
<robertwb@math.washington.edu>
Sat, 11 Dec 2010 10:31:25 +0000
(
02:31
-0800)
Cython/Shadow.py
patch
|
blob
|
history
diff --git
a/Cython/Shadow.py
b/Cython/Shadow.py
index 0e22be6bd49d23df5391cd081bf3afa0dfd8c59f..ddfb3fc55700659239986c4d03fe28737367f319 100644
(file)
--- 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