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
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
nexedi
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"""
__doc__
=
u"""
>>> a = A()
>>> a = A()
>>> a.foo()
>>> a.foo()
(True,
u
'yo')
(True, 'yo')
>>> a.foo(False)
>>> a.foo(False)
(False,
u
'yo')
(False, 'yo')
>>> a.foo(10,
u
'yes')
>>> a.foo(10, 'yes')
(True,
u
'yes')
(True, 'yes')
"""
"""
import
sys
if
sys
.
version_info
[
0
]
>=
3
:
__doc__
=
__doc__
.
replace
(
u"u'"
,
u"'"
)
cdef
class
A
:
cdef
class
A
:
cpdef
foo
(
self
,
bint
a
=
True
,
b
=
u
"yo"
):
cpdef
foo
(
self
,
bint
a
=
True
,
b
=
"yo"
):
return
a
,
b
return
a
,
b
def
call0
():
def
call0
():
"""
"""
>>> call0()
>>> call0()
(True,
u
'yo')
(True, 'yo')
"""
"""
cdef
A
a
=
A
()
cdef
A
a
=
A
()
return
a
.
foo
()
return
a
.
foo
()
...
@@ -29,7 +24,7 @@ def call0():
...
@@ -29,7 +24,7 @@ def call0():
def
call1
():
def
call1
():
"""
"""
>>> call1()
>>> call1()
(False,
u
'yo')
(False, 'yo')
"""
"""
cdef
A
a
=
A
()
cdef
A
a
=
A
()
return
a
.
foo
(
False
)
return
a
.
foo
(
False
)
...
@@ -37,7 +32,7 @@ def call1():
...
@@ -37,7 +32,7 @@ def call1():
def
call2
():
def
call2
():
"""
"""
>>> call2()
>>> call2()
(False,
u
'go')
(False, 'go')
"""
"""
cdef
A
a
=
A
()
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