diff options
author | Mark Shannon <mark@hotpy.org> | 2023-06-13 08:51:05 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-13 08:51:05 (GMT) |
commit | 09ffa69e2e84950751739ab500f820725e00a3dd (patch) | |
tree | aec7308298f61cd813a9baa1d81e2c1348160e64 /Lib/dis.py | |
parent | 217589d4f3246d67c6ef0eb0be2b1c33987cf260 (diff) | |
download | cpython-09ffa69e2e84950751739ab500f820725e00a3dd.zip cpython-09ffa69e2e84950751739ab500f820725e00a3dd.tar.gz cpython-09ffa69e2e84950751739ab500f820725e00a3dd.tar.bz2 |
GH-105678: Split MAKE_FUNCTION into MAKE_FUNCTION and SET_FUNCTION_ATTRIBUTE (GH-105680)
Diffstat (limited to 'Lib/dis.py')
-rw-r--r-- | Lib/dis.py | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -32,8 +32,8 @@ FORMAT_VALUE_CONVERTERS = ( (repr, 'repr'), (ascii, 'ascii'), ) -MAKE_FUNCTION = opmap['MAKE_FUNCTION'] -MAKE_FUNCTION_FLAGS = ('defaults', 'kwdefaults', 'annotations', 'closure') +SET_FUNCTION_ATTRIBUTE = opmap['SET_FUNCTION_ATTRIBUTE'] +FUNCTION_ATTR_FLAGS = ('defaults', 'kwdefaults', 'annotations', 'closure') LOAD_CONST = opmap['LOAD_CONST'] RETURN_CONST = opmap['RETURN_CONST'] @@ -586,8 +586,8 @@ def _get_instructions_bytes(code, varname_from_oparg=None, if argrepr: argrepr += ', ' argrepr += 'with format' - elif deop == MAKE_FUNCTION: - argrepr = ', '.join(s for i, s in enumerate(MAKE_FUNCTION_FLAGS) + elif deop == SET_FUNCTION_ATTRIBUTE: + argrepr = ', '.join(s for i, s in enumerate(FUNCTION_ATTR_FLAGS) if arg & (1<<i)) elif deop == BINARY_OP: _, argrepr = _nb_ops[arg] |