Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix detection
  • Loading branch information
picnixz committed Aug 20, 2024
commit 6cd65cfdb3af2d5cbe67d4d64d0df3a1efe7518b
4 changes: 2 additions & 2 deletions Lib/dis.py
Original file line number Diff line number Diff line change
Expand Up @@ -854,10 +854,10 @@ def _get_positions_width(code):
# will print ? instead, thus the minimum width is 8 = 1 + len('?:?-?:?'),
# except if all positions are undefined, in which case positions are not
# printed (i.e. positions_width = 0).
has_value = True
has_value = False
values_width = 0
for positions in code.co_positions():
if not has_value and any(isinstance(p) for p in positions):
if not has_value and any(isinstance(p, int) for p in positions):
has_value = True
width = sum(1 if p is None else len(str(p)) for p in positions)
values_width = max(width, values_width)
Expand Down