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
Xavier Thompson
cython
Commits
0a4f732f
Commit
0a4f732f
authored
7 years ago
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
git+ssh://github.com/cython/cython
parents
1e66160e
e68c5668
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
tests/run/annotation_typing.pyx
tests/run/annotation_typing.pyx
+5
-5
No files found.
tests/run/annotation_typing.pyx
View file @
0a4f732f
...
@@ -87,13 +87,13 @@ def pytypes_cdef(a, b=2, c=3, d=4):
...
@@ -87,13 +87,13 @@ def pytypes_cdef(a, b=2, c=3, d=4):
def
ctypes_def
(
a
:
list
,
b
:
cython
.
int
=
2
,
c
:
cython
.
long
=
3
,
d
:
cython
.
float
=
4
)
->
list
:
def
ctypes_def
(
a
:
list
,
b
:
cython
.
int
=
2
,
c
:
cython
.
long
=
3
,
d
:
cython
.
float
=
4
)
->
list
:
"""
"""
>>>
py
types_def([1])
>>>
c
types_def([1])
('list object', '
Python object', 'Python object', 'double
')
('list object', '
int', 'long', 'float
')
[1, 2, 3, 4.0]
[1, 2, 3, 4.0]
>>>
py
types_def([1], 3)
>>>
c
types_def([1], 3)
('list object', '
Python object', 'Python object', 'double
')
('list object', '
int', 'long', 'float
')
[1, 3, 3, 4.0]
[1, 3, 3, 4.0]
>>>
py
types_def(123)
>>>
c
types_def(123)
Traceback (most recent call last):
Traceback (most recent call last):
TypeError: Argument 'a' has incorrect type (expected list, got int)
TypeError: Argument 'a' has incorrect type (expected list, got int)
"""
"""
...
...
This diff is collapsed.
Click to expand it.
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