[ Web Proxy ]
URL:
Viewing: https://raw.githubusercontent.com/filmor/pythonnet/drop-python2/src/runtime/ReferenceExtensions.cs [Back]  [Original]

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;
    }
}

Web Proxy Viewer  |  New URL  |  Original Page