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

Method _abs

crates/vm/src/vm/vm_ops.rs:515–519  ·  view source on GitHub ↗
(&self, a: &PyObject)

Source from the content-addressed store, hash-verified

513 }
514
515 pub fn _abs(&self, a: &PyObject) -> PyResult<PyObjectRef> {
516 self.get_special_method(a, identifier!(self, __abs__))?
517 .ok_or_else(|| self.new_unsupported_unary_error(a, "abs()"))?
518 .invoke((), self)
519 }
520
521 pub fn _pos(&self, a: &PyObject) -> PyResult {
522 self.get_special_method(a, identifier!(self, __pos__))?

Callers 2

absFunction · 0.80
absFunction · 0.80

Calls 4

ok_or_elseMethod · 0.80
get_special_methodMethod · 0.80
invokeMethod · 0.45

Tested by

no test coverage detected