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

Method not

crates/vm/src/protocol/object.rs:51–53  ·  view source on GitHub ↗
(self, vm: &VirtualMachine)

Source from the content-addressed store, hash-verified

49 }
50
51 pub fn not(self, vm: &VirtualMachine) -> PyResult<bool> {
52 self.is_true(vm).map(|x| !x)
53 }
54
55 pub fn length_hint(self, defaultvalue: usize, vm: &VirtualMachine) -> PyResult<usize> {
56 Ok(vm.length_hint_opt(self)?.unwrap_or(defaultvalue))

Callers 1

int.rsFile · 0.80

Calls 2

is_trueMethod · 0.80
mapMethod · 0.45

Tested by

no test coverage detected