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

Function is_placeholder

crates/vm/src/stdlib/_functools.rs:118–120  ·  view source on GitHub ↗
(obj: &PyObjectRef)

Source from the content-addressed store, hash-verified

116 }
117
118 fn is_placeholder(obj: &PyObjectRef) -> bool {
119 &*obj.class().name() == "_PlaceholderType"
120 }
121
122 fn count_placeholders(args: &[PyObjectRef]) -> usize {
123 args.iter().filter(|a| is_placeholder(a)).count()

Callers 4

count_placeholdersFunction · 0.85
__setstate__Method · 0.85
py_newMethod · 0.85
callMethod · 0.85

Calls 2

nameMethod · 0.45
classMethod · 0.45

Tested by

no test coverage detected