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

Method _pos

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

Source from the content-addressed store, hash-verified

519 }
520
521 pub fn _pos(&self, a: &PyObject) -> PyResult {
522 self.get_special_method(a, identifier!(self, __pos__))?
523 .ok_or_else(|| self.new_unsupported_unary_error(a, "unary +"))?
524 .invoke((), self)
525 }
526
527 pub fn _neg(&self, a: &PyObject) -> PyResult {
528 self.get_special_method(a, identifier!(self, __neg__))?

Callers 2

call_intrinsic_1Method · 0.80
posFunction · 0.80

Calls 4

ok_or_elseMethod · 0.80
get_special_methodMethod · 0.80
invokeMethod · 0.45

Tested by

no test coverage detected