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
Boxiang Sun
cython
Commits
81c90b1c
Commit
81c90b1c
authored
Mar 13, 2010
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Py3 test fix
parent
c304a144
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
14 deletions
+9
-14
tests/run/cdef_opt.pyx
tests/run/cdef_opt.pyx
+9
-14
No files found.
tests/run/cdef_opt.pyx
View file @
81c90b1c
__doc__
=
u"""
>>> a = A()
>>> a.foo()
(True,
u
'yo')
(True, 'yo')
>>> a.foo(False)
(False,
u
'yo')
>>> a.foo(10,
u
'yes')
(True,
u
'yes')
(False, 'yo')
>>> a.foo(10, 'yes')
(True, 'yes')
"""
import
sys
if
sys
.
version_info
[
0
]
>=
3
:
__doc__
=
__doc__
.
replace
(
u"u'"
,
u"'"
)
cdef
class
A
:
cpdef
foo
(
self
,
bint
a
=
True
,
b
=
u
"yo"
):
cpdef
foo
(
self
,
bint
a
=
True
,
b
=
"yo"
):
return
a
,
b
def
call0
():
"""
>>> call0()
(True,
u
'yo')
(True, 'yo')
"""
cdef
A
a
=
A
()
return
a
.
foo
()
...
...
@@ -29,7 +24,7 @@ def call0():
def
call1
():
"""
>>> call1()
(False,
u
'yo')
(False, 'yo')
"""
cdef
A
a
=
A
()
return
a
.
foo
(
False
)
...
...
@@ -37,7 +32,7 @@ def call1():
def
call2
():
"""
>>> call2()
(False,
u
'go')
(False, 'go')
"""
cdef
A
a
=
A
()
return
a
.
foo
(
False
,
u
"go"
)
return
a
.
foo
(
False
,
"go"
)
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