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

Method take_positional

crates/vm/src/function/argument.rs:248–254  ·  view source on GitHub ↗
(&mut self)

Source from the content-addressed store, hash-verified

246 }
247
248 pub fn take_positional(&mut self) -> Option<PyObjectRef> {
249 if self.args.is_empty() {
250 None
251 } else {
252 Some(self.args.remove(0))
253 }
254 }
255
256 pub fn take_positional_keyword(&mut self, name: &str) -> Option<PyObjectRef> {
257 self.take_positional().or_else(|| self.take_keyword(name))

Callers 5

from_argsMethod · 0.80
start_new_threadFunction · 0.80
joinMethod · 0.80
start_joinable_threadFunction · 0.80

Calls 3

SomeClass · 0.50
is_emptyMethod · 0.45
removeMethod · 0.45

Tested by

no test coverage detected