Python.Runtime.MethodBinding.tp_getattro C# (CSharp) Method

tp_getattro() private method

private tp_getattro ( IntPtr ob, IntPtr key ) : IntPtr
ob System.IntPtr
key System.IntPtr
return System.IntPtr
	public static IntPtr tp_getattro(IntPtr ob, IntPtr key) {
	    MethodBinding self = (MethodBinding)GetManagedObject(ob);

	    if (!Runtime.PyString_Check(key)) {
		Exceptions.SetError(Exceptions.TypeError, "string expected");
		return IntPtr.Zero;
	    }

	    string name = Runtime.GetManagedString(key);
	    if (name == "__doc__") {
		IntPtr doc = self.m.GetDocString();
		Runtime.Incref(doc);
		return doc;
	    }

	    return Runtime.PyObject_GenericGetAttr(ob, key);
	}