blob: 9baabbc7e96f21cb47963cdd9cd0e6e72b631e0b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
|
# mode: run
# tag: is_not
cimport cython
@cython.test_fail_if_path_exists('//NotNode')
def is_not(a, b):
"""
>>> is_not(1, 2)
True
>>> x = 1
>>> is_not(x, x)
False
"""
return a is not b
@cython.test_fail_if_path_exists('//NotNode')
def not_is_not(a, b):
"""
>>> not_is_not(1, 2)
False
>>> x = 1
>>> not_is_not(x, x)
True
"""
return not a is not b
@cython.test_fail_if_path_exists('//NotNode')
def not_is(a, b):
"""
>>> not_is(1, 2)
True
>>> x = 1
>>> not_is(x, x)
False
"""
return not a is b
@cython.test_fail_if_path_exists('//NotNode')
def is_not_None(a):
"""
>>> is_not_None(1)
True
>>> is_not_None(None)
False
"""
return a is not None
@cython.test_fail_if_path_exists('//NotNode')
def not_is_not_None(a):
"""
>>> not_is_not_None(1)
False
>>> not_is_not_None(None)
True
"""
return not a is not None
@cython.test_fail_if_path_exists('//NotNode')
def not_is_None(a):
"""
>>> not_is_None(1)
True
>>> not_is_None(None)
False
"""
return not a is None
|