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

Method __contains__

crates/vm/src/builtins/str.rs:622–624  ·  view source on GitHub ↗
(&self, needle: PyObjectRef, vm: &VirtualMachine)

Source from the content-addressed store, hash-verified

620 }
621
622 fn __contains__(&self, needle: PyObjectRef, vm: &VirtualMachine) -> PyResult<bool> {
623 self._contains(&needle, vm)
624 }
625
626 fn _getitem(&self, needle: &PyObject, vm: &VirtualMachine) -> PyResult {
627 let item = match SequenceIndex::try_from_borrowed_object(vm, needle, "str")? {

Callers

nothing calls this directly

Calls 1

_containsMethod · 0.45

Tested by

no test coverage detected