cython-devel
changeset 4216:105ceb03fcc7
another fix
| author | Robert Bradshaw <robertwb@math.washington.edu> |
|---|---|
| date | Sat Dec 11 02:31:25 2010 -0800 (2 years ago) |
| parents | 4a0535563b40 |
| children | a6b9f0a6d02d |
| files | Cython/Shadow.py |
line diff
1.1 --- a/Cython/Shadow.py Sat Dec 11 02:10:14 2010 -0800
1.2 +++ b/Cython/Shadow.py Sat Dec 11 02:31:25 2010 -0800
1.3 @@ -190,10 +190,15 @@
1.4
1.5
1.6 try:
1.7 - set
1.8 -except NameError:
1.9 - # Python 2.3
1.10 - from sets import Set as set, ImmutableSet as frozenset
1.11 + # Python 3
1.12 + from builtins import set, frozenset
1.13 +except ImportError:
1.14 + try:
1.15 + # Python 2.4+
1.16 + from __builtin__ import set, frozenset
1.17 + except ImportError:
1.18 + # Py 2.3
1.19 + from sets import Set as set, ImmutableSet as frozenset
1.20
1.21 # Predefined types
1.22
