summaryrefslogtreecommitdiffstats
path: root/Lib/dis.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/dis.py')
-rw-r--r--Lib/dis.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/Lib/dis.py b/Lib/dis.py
index f135a0b..f7a31f2 100644
--- a/Lib/dis.py
+++ b/Lib/dis.py
@@ -572,8 +572,10 @@ def _get_instructions_bytes(code, varname_from_oparg=None,
elif deop in haslocal or deop in hasfree:
argval, argrepr = _get_name_info(arg, varname_from_oparg)
elif deop in hascompare:
- argval = cmp_op[arg>>4]
+ argval = cmp_op[arg >> 5]
argrepr = argval
+ if arg & 16:
+ argrepr = f"bool({argrepr})"
elif deop == CONVERT_VALUE:
argval = (None, str, repr, ascii)[arg]
argrepr = ('', 'str', 'repr', 'ascii')[arg]