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

Method number

crates/vm/src/protocol/number.rs:23–25  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

21impl PyObject {
22 #[inline]
23 pub const fn number(&self) -> PyNumber<'_> {
24 PyNumber { obj: self }
25 }
26
27 pub fn try_index_opt(&self, vm: &VirtualMachine) -> Option<PyResult<PyIntRef>> {
28 if let Some(i) = self.downcast_ref_if_exact::<PyInt>(vm) {

Callers 6

collation_callbackMethod · 0.80
try_index_optMethod · 0.80
try_intMethod · 0.80
try_float_optMethod · 0.80
callMethod · 0.80
try_to_boolMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected