Skip to content

Commit fd88290

Browse files
committed
pyobject: added IsNone()
1 parent d8857b5 commit fd88290

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/runtime/pyobject.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -852,6 +852,10 @@ public bool IsTrue()
852852
return Runtime.PyObject_IsTrue(obj) != 0;
853853
}
854854

855+
/// <summary>
856+
/// Return true if the object is None
857+
/// </summary>
858+
public bool IsNone() => CheckNone(this) == null;
855859

856860
/// <summary>
857861
/// Dir Method

0 commit comments

Comments
 (0)