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

Function get_special_method_name

crates/vm/src/frame.rs:9648–9655  ·  view source on GitHub ↗
(oparg: SpecialMethod, vm: &VirtualMachine)

Source from the content-addressed store, hash-verified

9646}
9647
9648fn get_special_method_name(oparg: SpecialMethod, vm: &VirtualMachine) -> &'static PyStrInterned {
9649 match oparg {
9650 SpecialMethod::Enter => identifier!(vm, __enter__),
9651 SpecialMethod::Exit => identifier!(vm, __exit__),
9652 SpecialMethod::AEnter => identifier!(vm, __aenter__),
9653 SpecialMethod::AExit => identifier!(vm, __aexit__),
9654 }
9655}
9656
9657/// _Py_SpecialMethod _Py_SpecialMethods
9658fn get_special_method_error_msg(

Callers 2

execute_instructionMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected