Commit 56d59182 authored by Stefan Behnel's avatar Stefan Behnel

new tests for 'in' operator

parent 32b9adc9
__doc__ = """
>>> f(1,[1,2,3])
True
>>> f(5,[1,2,3])
False
>>> f(2,(1,2,3))
True
>>> g(1,[1,2,3])
1
>>> g(5,[1,2,3])
0
>>> g(2,(1,2,3))
1
>>> h([1,2,3,4])
True
>>> h([1,3,4])
False
>>> j([1,2,3,4])
1
>>> j([1,3,4])
0
"""
def f(a,b):
result = a in b
return result
def g(a,b):
cdef int result
result = a in b
return result
def h(b):
result = 2 in b
return result
def j(b):
cdef int result
result = 2 in b
return result
__doc__ = """
>>> f(1,[1,2,3])
False
>>> f(5,[1,2,3])
True
>>> f(2,(1,2,3))
False
>>> g(1,[1,2,3])
0
>>> g(5,[1,2,3])
1
>>> g(2,(1,2,3))
0
>>> h([1,2,3,4])
False
>>> h([1,3,4])
True
>>> j([1,2,3,4])
0
>>> j([1,3,4])
1
"""
def f(a,b):
result = a not in b
return result
def g(a,b):
cdef int result
result = a not in b
return result
def h(b):
result = 2 not in b
return result
def j(b):
cdef int result
result = 2 not in b
return result
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