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
Kirill Smelkov
cython
Commits
5e702a5e
Commit
5e702a5e
authored
Dec 07, 2013
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix return type of repr(): CPython guarantees to return str
parent
046d77d9
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
1 deletion
+5
-1
Cython/Compiler/Builtin.py
Cython/Compiler/Builtin.py
+1
-1
tests/compile/builtinfuncs.pyx
tests/compile/builtinfuncs.pyx
+4
-0
No files found.
Cython/Compiler/Builtin.py
View file @
5e702a5e
...
...
@@ -215,7 +215,7 @@ builtin_function_table = [
#('raw_input', "", "", ""),
#('reduce', "", "", ""),
BuiltinFunction
(
'reload'
,
"O"
,
"O"
,
"PyImport_ReloadModule"
),
BuiltinFunction
(
'repr'
,
"O"
,
"O"
,
"PyObject_Repr"
,
builtin_return_type
=
'
basestring
'
),
BuiltinFunction
(
'repr'
,
"O"
,
"O"
,
"PyObject_Repr"
,
builtin_return_type
=
'
str
'
),
#('round', "", "", ""),
BuiltinFunction
(
'setattr'
,
"OOO"
,
"r"
,
"PyObject_SetAttr"
),
#('sum', "", "", ""),
...
...
tests/compile/builtinfuncs.pyx
View file @
5e702a5e
...
...
@@ -2,6 +2,8 @@
cdef
int
f
()
except
-
1
:
cdef
object
x
,
y
=
0
,
z
=
0
,
w
=
0
cdef
str
sstring
cdef
basestring
sustring
cdef
int
i
x
=
abs
(
y
)
delattr
(
x
,
'spam'
)
...
...
@@ -20,6 +22,8 @@ cdef int f() except -1:
x
=
pow
(
y
,
z
)
x
=
reload
(
y
)
x
=
repr
(
y
)
sstring
=
repr
(
x
)
sustring
=
repr
(
x
)
setattr
(
x
,
y
,
z
)
#i = typecheck(x, y)
#i = issubtype(x, y)
...
...
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