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