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
ed37fcd8
Commit
ed37fcd8
authored
Oct 03, 2014
by
Robert Bradshaw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Test and note for tuple types.
parent
137605d6
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
0 deletions
+25
-0
CHANGES.rst
CHANGES.rst
+2
-0
tests/run/ctuple.pyx
tests/run/ctuple.pyx
+23
-0
No files found.
CHANGES.rst
View file @
ed37fcd8
...
@@ -13,6 +13,8 @@ Features added
...
@@ -13,6 +13,8 @@ Features added
* ``PySlice_*()`` C-API functions are available from the ``cpython.slice``
* ``PySlice_*()`` C-API functions are available from the ``cpython.slice``
module.
module.
* Anonymous C tuple types can be declared as (ctype1, ctype2, ...).
Bugs fixed
Bugs fixed
----------
----------
...
...
tests/run/ctuple.pyx
0 → 100644
View file @
ed37fcd8
def
convert
(
*
o
):
"""
>>> convert(1, 2)
(1, 2.0)
>>> convert(1)
Traceback (most recent call last):
...
TypeError: Expected a tuple of size 2, got tuple
>>> convert(1, 2, 3)
Traceback (most recent call last):
...
TypeError: Expected a tuple of size 2, got tuple
"""
cdef
(
int
,
double
)
xy
=
o
return
xy
cpdef
(
int
,
double
)
ctuple_return_type
(
x
,
y
):
"""
>>> ctuple_return_type(1, 2)
(1, 2.0)
"""
return
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