1# ticket: 227 2 3from cpython.bool cimport bool 4 5def foo(bool a): 6 """ 7 >>> foo(True) 8 True 9 >>> foo(False) 10 False 11 >>> foo('abc') # doctest: +ELLIPSIS 12 Traceback (most recent call last): 13 TypeError: ... 14 """ 15 return a == True 16 17def call_cfoo(a): 18 """ 19 >>> call_cfoo(True) 20 True 21 >>> call_cfoo(False) 22 False 23 >>> call_cfoo('abc') # doctest: +ELLIPSIS 24 Traceback (most recent call last): 25 TypeError: ... 26 """ 27 return cfoo(a) 28 29cdef cfoo(bool a): 30 return a == True 31