Cython has moved to github.
cython-devel
view tests/bugs/cdef_bool_T227.pyx @ 1801:3e08dec3cdd0
test case for ticket 227
| author | Stefan Behnel <scoder@users.berlios.de> |
|---|---|
| date | Sun Mar 01 20:50:15 2009 +0100 (3 years ago) |
| parents | |
| children |
line source
1 __doc__ = u"""
2 >>> foo(True)
3 True
4 >>> foo(False)
5 False
6 >>> foo('abc') # doctest: +ELLIPSIS
7 Traceback (most recent call last):
8 TypeError: ...
10 >>> call_cfoo(True)
11 True
12 >>> call_cfoo(False)
13 False
14 >>> call_cfoo('abc') # doctest: +ELLIPSIS
15 Traceback (most recent call last):
16 TypeError: ...
17 """
19 def foo(bool a):
20 return a == True
22 def call_cfoo(a):
23 return cfoo(a)
25 cdef cfoo(bool a):
26 return a == True
