projects
/
cython.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
075e282
)
fix for cython.set in Py3
author
Stefan Behnel
<scoder@users.berlios.de>
Sun, 14 Mar 2010 11:34:02 +0000
(12:34 +0100)
committer
Stefan Behnel
<scoder@users.berlios.de>
Sun, 14 Mar 2010 11:34:02 +0000
(12:34 +0100)
Cython/Shadow.py
patch
|
blob
|
history
diff --git
a/Cython/Shadow.py
b/Cython/Shadow.py
index 6b638d73c2deaaa0fa588792dd42107e2f7f942c..323fcec3987d0a147ddf623706d337cbf547551b 100644
(file)
--- 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