MCPcopy Create free account
hub / github.com/QuipNetwork/xquad / from_code

Method from_code

xqvm_py/opcodes.py:840–845  ·  view source on GitHub ↗

Look up an opcode by its numeric code.

(cls, code: int)

Source from the content-addressed store, hash-verified

838
839 @classmethod
840 def from_code(cls, code: int) -> Opcode | None:
841 """Look up an opcode by its numeric code."""
842 for op in cls:
843 if op.code == code:
844 return op
845 return None
846
847 @classmethod
848 def from_name(cls, name: str) -> Opcode | None:

Callers 5

program_from_bytecodeFunction · 0.80
program_from_xqasmFunction · 0.80
test_from_code_validMethod · 0.80

Calls

no outgoing calls

Tested by 3

test_from_code_validMethod · 0.64