Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Gwenaël Samain
cython
Commits
d292efbb
Commit
d292efbb
authored
Oct 24, 2014
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix shadow module in Py3
parent
3b9a6dc5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
5 deletions
+9
-5
Cython/Shadow.py
Cython/Shadow.py
+9
-5
No files found.
Cython/Shadow.py
View file @
d292efbb
...
...
@@ -347,11 +347,6 @@ except NameError: # Py3
py_float
=
typedef
(
float
,
"float"
)
py_complex
=
typedef
(
complex
,
"double complex"
)
try
:
unicode
=
typedef
(
unicode
,
"unicode"
)
except
NameError
:
# Py3
unicode
=
typedef
(
str
,
"unicode"
)
# Predefined types
...
...
@@ -370,6 +365,15 @@ to_repr = {
gs
=
globals
()
# note: cannot simply name the unicode type here as 2to3 gets in the way and replaces it by str
try
:
import
__builtin__
as
builtins
except
ImportError
:
# Py3
import
builtins
gs
[
'unicode'
]
=
typedef
(
getattr
(
builtins
,
'unicode'
,
str
),
'unicode'
)
del
builtins
for
name
in
int_types
:
reprname
=
to_repr
(
name
,
name
)
gs
[
name
]
=
typedef
(
py_int
,
reprname
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment