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

Method start

crates/stdlib/src/re.rs:368–375  ·  view source on GitHub ↗
(&self, group: OptionalArg, vm: &VirtualMachine)

Source from the content-addressed store, hash-verified

366 impl PyMatch {
367 #[pymethod]
368 fn start(&self, group: OptionalArg, vm: &VirtualMachine) -> PyResult {
369 let group = group.unwrap_or_else(|| vm.ctx.new_int(0).into());
370 let start = self.get_bounds(group, vm)?.map_or_else(
371 || vm.ctx.new_int(-1).into(),
372 |r| vm.ctx.new_int(r.start).into(),
373 );
374 Ok(start)
375 }
376
377 #[pymethod]
378 fn end(&self, group: OptionalArg, vm: &VirtualMachine) -> PyResult {

Callers 15

from_ruff_parse_errorMethod · 0.45
do_splitFunction · 0.45
create_matchFunction · 0.45
emit_next_tokenFunction · 0.45
next_non_dedent_infoFunction · 0.45
raise_indentation_errorFunction · 0.45
get_rangeMethod · 0.45
line_index_startMethod · 0.45
scan_parameterMethod · 0.45
scan_statementMethod · 0.45
scan_expressionMethod · 0.45
scan_comprehensionMethod · 0.45

Calls 2

get_boundsMethod · 0.80
new_intMethod · 0.45

Tested by

no test coverage detected