MCPcopy Create free account
hub / github.com/eshirazi/python-with-braces / tuple_of_constants

Function tuple_of_constants

Python/peephole.c:36–75  ·  view source on GitHub ↗

Replace LOAD_CONST c1. LOAD_CONST c2 ... LOAD_CONST cn BUILD_TUPLE n with LOAD_CONST (c1, c2, ... cn). The consts table must still be in list form so that the new constant (c1, c2, ... cn) can be appended. Called with codestr pointing to the first LOAD_CONST. Bails out with no change if one or more of the LOAD_CONSTs is missing. Also works for BUILD_LIST when followed by an "i

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 1

PyCode_OptimizeFunction · 0.85

Calls 2

PyTuple_NewFunction · 0.85
PyList_AppendFunction · 0.85

Tested by

no test coverage detected