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

Method new_bool

crates/vm/src/vm/context.rs:568–575  ·  view source on GitHub ↗
(&self, b: bool)

Source from the content-addressed store, hash-verified

566
567 #[inline(always)]
568 pub fn new_bool(&self, b: bool) -> PyRef<PyBool> {
569 let value = if b {
570 &self.true_value
571 } else {
572 &self.false_value
573 };
574 value.to_owned()
575 }
576
577 #[inline(always)]
578 pub fn new_tuple(&self, elements: Vec<PyObjectRef>) -> PyTupleRef {

Callers 15

enum_certificatesFunction · 0.45
task_step_handle_resultFunction · 0.45
_get_proxy_settingsFunction · 0.45
call_scan_onceMethod · 0.45
newMethod · 0.45
tcl_obj_to_pyobjectMethod · 0.45
enum_certificatesFunction · 0.45
unpackMethod · 0.45
visit_boolMethod · 0.45
execute_instructionMethod · 0.45
execute_compareMethod · 0.45
with_valueMethod · 0.45

Calls 1

to_ownedMethod · 0.45

Tested by

no test coverage detected