PyObject_HasAttr() private method

private PyObject_HasAttr ( IntPtr pointer, IntPtr name ) : int
pointer IntPtr
name IntPtr
return int
Ejemplo n.º 1
0
        /// <summary>
        /// HasAttr Method
        /// </summary>
        /// <remarks>
        /// Returns true if the object has an attribute with the given name,
        /// where name is a PyObject wrapping a string or unicode object.
        /// </remarks>
        public bool HasAttr(PyObject name)
        {
            if (name == null)
            {
                throw new ArgumentNullException(nameof(name));
            }

            return(Runtime.PyObject_HasAttr(obj, name.obj) != 0);
        }
Ejemplo n.º 2
0
 /// <summary>
 /// HasAttr Method
 /// </summary>
 /// <remarks>
 /// Returns true if the object has an attribute with the given name,
 /// where name is a PyObject wrapping a string or unicode object.
 /// </remarks>
 public bool HasAttr(PyObject name)
 {
     return(Runtime.PyObject_HasAttr(obj, name.obj) != 0);
 }