MCPcopy Index your code
hub / github.com/python/cpython / parse_opcode_signature

Function parse_opcode_signature

Doc/tools/extensions/pyspecific.py:51–62  ·  view source on GitHub ↗

Transform an opcode signature into RST nodes.

(env, sig, signode)

Source from the content-addressed store, hash-verified

49
50
51def parse_opcode_signature(env, sig, signode):
52 """Transform an opcode signature into RST nodes."""
53 m = opcode_sig_re.match(sig)
54 if m is None:
55 raise ValueError
56 opname, arglist = m.groups()
57 signode += addnodes.desc_name(opname, opname)
58 if arglist is not None:
59 paramlist = addnodes.desc_parameterlist()
60 signode += paramlist
61 paramlist += addnodes.desc_parameter(arglist, arglist)
62 return opname.strip()
63
64
65# Support for documenting pdb commands

Callers

nothing calls this directly

Calls 3

matchMethod · 0.45
groupsMethod · 0.45
stripMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…