MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / _get_const_info

Function _get_const_info

tools/python-3.11.9-amd64/Lib/dis.py:369–379  ·  view source on GitHub ↗

Helper to get optional details about const references Returns the dereferenced constant and its repr if the value can be calculated. Otherwise returns the sentinel value dis.UNKNOWN for the value and an empty string for its repr.

(op, arg, co_consts)

Source from the content-addressed store, hash-verified

367 return argval
368
369def _get_const_info(op, arg, co_consts):
370 """Helper to get optional details about const references
371
372 Returns the dereferenced constant and its repr if the value
373 can be calculated.
374 Otherwise returns the sentinel value dis.UNKNOWN for the value
375 and an empty string for its repr.
376 """
377 argval = _get_const_value(op, arg, co_consts)
378 argrepr = repr(argval) if argval is not UNKNOWN else ''
379 return argval, argrepr
380
381def _get_name_info(name_index, get_name, **extrainfo):
382 """Helper to get optional details about named references

Callers 1

_get_instructions_bytesFunction · 0.85

Calls 1

_get_const_valueFunction · 0.85

Tested by

no test coverage detected