namespace Python.Runtime
{
using System.Diagnostics.Contracts;
static class ReferenceExtensions
{
///
/// Checks if the reference points to Python object None.
///
[Pure]
public static bool IsNone(this in NewReference reference)
=> reference.DangerousGetAddress() == Runtime.PyNone;
///
/// Checks if the reference points to Python object None.
///
[Pure]
public static bool IsNone(this BorrowedReference reference)
=> reference.DangerousGetAddress() == Runtime.PyNone;
}
}