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

Method has_name

crates/stdlib/src/_opcode.rs:80–97  ·  view source on GitHub ↗
(opcode: i32)

Source from the content-addressed store, hash-verified

78 /// Check if instruction uses co_names
79 #[must_use]
80 pub fn has_name(opcode: i32) -> bool {
81 matches!(
82 Self::try_from(opcode).map(|op| op.inner()),
83 Ok(AnyInstruction::Real(
84 Instruction::DeleteAttr { .. }
85 | Instruction::DeleteGlobal { .. }
86 | Instruction::DeleteName { .. }
87 | Instruction::ImportFrom { .. }
88 | Instruction::ImportName { .. }
89 | Instruction::LoadAttr { .. }
90 | Instruction::LoadGlobal { .. }
91 | Instruction::LoadName { .. }
92 | Instruction::StoreAttr { .. }
93 | Instruction::StoreGlobal { .. }
94 | Instruction::StoreName { .. }
95 ))
96 )
97 }
98
99 /// Check if instruction is a jump
100 #[must_use]

Callers 1

opcode.pyFile · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected