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
4fb73c07
Commit
4fb73c07
authored
Apr 30, 2014
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '0.20.x'
parents
a43800a9
6b5856ab
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
3 deletions
+29
-3
Cython/Compiler/PyrexTypes.py
Cython/Compiler/PyrexTypes.py
+0
-2
tests/run/cdefoptargs.pyx
tests/run/cdefoptargs.pyx
+29
-1
No files found.
Cython/Compiler/PyrexTypes.py
View file @
4fb73c07
...
...
@@ -2445,8 +2445,6 @@ class CFuncType(CType):
if
self
.
nogil
!=
other_type
.
nogil
:
return
0
self
.
original_sig
=
other_type
.
original_sig
or
other_type
if
as_cmethod
:
self
.
args
[
0
]
=
other_type
.
args
[
0
]
return
1
...
...
tests/run/cdefoptargs.pyx
View file @
4fb73c07
# the calls:
from
cython
cimport
typeof
def
call2
():
"""
...
...
@@ -39,3 +39,31 @@ def test_foo():
print
foo
(
1
,
2
)
print
foo
(
1
,
2
,
3
)
print
foo
(
1
,
foo
(
2
,
3
),
foo
(
4
))
cdef
class
A
:
cpdef
method
(
self
):
"""
>>> A().method()
'A'
"""
return
typeof
(
self
)
cdef
class
B
(
A
):
cpdef
method
(
self
,
int
x
=
0
):
"""
>>> B().method()
('B', 0)
>>> B().method(100)
('B', 100)
"""
return
typeof
(
self
),
x
cdef
class
C
(
B
):
cpdef
method
(
self
,
int
x
=
10
):
"""
>>> C().method()
('C', 10)
>>> C().method(100)
('C', 100)
"""
return
typeof
(
self
),
x
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