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