pub trait GetAttr: PyPayload {
// Required method
fn getattro(
zelf: &Py<Self>,
name: &Py<PyStr>,
vm: &VirtualMachine
) -> PyResult;
// Provided methods
fn slot_getattro(
obj: &PyObject,
name: &Py<PyStr>,
vm: &VirtualMachine
) -> PyResult { ... }
fn getattribute(
zelf: PyRef<Self>,
name: PyStrRef,
vm: &VirtualMachine
) -> PyResult { ... }
fn __extend_method_def(method_defs: &mut Vec<PyMethodDef>) { ... }
fn __extend_py_class(ctx: &Context, class: &'static Py<PyType>) { ... }
fn __extend_slots(slots: &mut PyTypeSlots) { ... }
}