Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e44f988

Browse files
authored
gh-91276: make space for longer opcodes in dis output (GH-91444)
1 parent f33e2c8 commit e44f988

3 files changed

Lines changed: 217 additions & 228 deletions

File tree

Lib/dis.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ def show_code(co, *, file=None):
245245
_ExceptionTableEntry = collections.namedtuple("_ExceptionTableEntry",
246246
"start end target depth lasti")
247247

248-
_OPNAME_WIDTH = 20
248+
_OPNAME_WIDTH = max(map(len, opmap))
249249
_OPARG_WIDTH = 5
250250

251251
class Instruction(_Instruction):

0 commit comments

Comments
 (0)