Python.Runtime.MethodObject.tp_getattro C# (CSharp) 메소드

tp_getattro() 개인적인 메소드

private tp_getattro ( IntPtr ob, IntPtr key ) : IntPtr
ob System.IntPtr
key System.IntPtr
리턴 System.IntPtr
	public static IntPtr tp_getattro(IntPtr ob, IntPtr key) {
	    MethodObject self = (MethodObject)GetManagedObject(ob);

	    if (!Runtime.PyString_Check(key)) {
		return Exceptions.RaiseTypeError("string expected");
	    }

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

	    return Runtime.PyObject_GenericGetAttr(ob, key);
	}