|
14 | 14 | 'delitem', 'eq', 'floordiv', 'ge', 'getitem', 'gt', 'iadd', 'iand', |
15 | 15 | 'iconcat', 'ifloordiv', 'ilshift', 'imatmul', 'imod', 'imul', |
16 | 16 | 'index', 'indexOf', 'inv', 'invert', 'ior', 'ipow', 'irshift', |
17 | | - 'is_', 'is_not', 'isub', 'itemgetter', 'itruediv', 'ixor', 'le', |
18 | | - 'length_hint', 'lshift', 'lt', 'matmul', 'methodcaller', 'mod', |
| 17 | + 'is_', 'is_none', 'is_not', 'is_not_none', 'isub', 'itemgetter', 'itruediv', |
| 18 | + 'ixor', 'le', 'length_hint', 'lshift', 'lt', 'matmul', 'methodcaller', 'mod', |
19 | 19 | 'mul', 'ne', 'neg', 'not_', 'or_', 'pos', 'pow', 'rshift', |
20 | 20 | 'setitem', 'sub', 'truediv', 'truth', 'xor'] |
21 | 21 |
|
@@ -66,6 +66,14 @@ def is_not(a, b): |
66 | 66 | "Same as a is not b." |
67 | 67 | return a is not b |
68 | 68 |
|
| 69 | +def is_none(a): |
| 70 | + "Same as a is None." |
| 71 | + return a is None |
| 72 | + |
| 73 | +def is_not_none(a): |
| 74 | + "Same as a is not None." |
| 75 | + return a is not None |
| 76 | + |
69 | 77 | # Mathematical/Bitwise Operations *********************************************# |
70 | 78 |
|
71 | 79 | def abs(a): |
|
0 commit comments