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

Method get

crates/sre_engine/src/engine.rs:63–70  ·  view source on GitHub ↗
(&self, group_index: usize)

Source from the content-addressed store, hash-verified

61
62impl Marks {
63 pub fn get(&self, group_index: usize) -> (Optioned<usize>, Optioned<usize>) {
64 let marks_index = 2 * group_index;
65 if marks_index + 1 < self.marks.len() {
66 (self.marks[marks_index], self.marks[marks_index + 1])
67 } else {
68 (Optioned::none(), Optioned::none())
69 }
70 }
71
72 pub const fn last_index(&self) -> isize {
73 self.last_index

Callers 2

__class_getitem__Method · 0.45
_matchFunction · 0.45

Calls 2

noneFunction · 0.85
lenMethod · 0.45

Tested by 1

__class_getitem__Method · 0.36