Commit 0a4f732f authored by Stefan Behnel's avatar Stefan Behnel

Merge branch 'master' of git+ssh://github.com/cython/cython

parents 1e66160e e68c5668
......@@ -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:
"""
>>> pytypes_def([1])
('list object', 'Python object', 'Python object', 'double')
>>> ctypes_def([1])
('list object', 'int', 'long', 'float')
[1, 2, 3, 4.0]
>>> pytypes_def([1], 3)
('list object', 'Python object', 'Python object', 'double')
>>> ctypes_def([1], 3)
('list object', 'int', 'long', 'float')
[1, 3, 3, 4.0]
>>> pytypes_def(123)
>>> ctypes_def(123)
Traceback (most recent call last):
TypeError: Argument 'a' has incorrect type (expected list, got int)
"""
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment