MCPcopy Index your code
hub / github.com/RustPython/RustPython / obj_type

Method obj_type

crates/vm/src/protocol/object.rs:685–687  ·  view source on GitHub ↗

type protocol PyObject *PyObject_Type(PyObject *o)

(&self)

Source from the content-addressed store, hash-verified

683 // type protocol
684 // PyObject *PyObject_Type(PyObject *o)
685 pub fn obj_type(&self) -> PyObjectRef {
686 self.class().to_owned().into()
687 }
688
689 // int PyObject_TypeCheck(PyObject *o, PyTypeObject *type)
690 pub fn type_check(&self, typ: &Py<PyType>) -> bool {

Callers 2

callMethod · 0.45
vectorcall_typeFunction · 0.45

Calls 2

to_ownedMethod · 0.45
classMethod · 0.45

Tested by

no test coverage detected