mirror of
https://github.com/python/cpython.git
synced 2025-08-22 09:45:06 +00:00
gh-112137: change dis output to show no-lineno as -- instead of None (#112335)
This commit is contained in:
parent
9e56eedd01
commit
89ddea4886
3 changed files with 18 additions and 16 deletions
|
@ -478,7 +478,8 @@ class Instruction(_Instruction):
|
|||
if self.starts_line:
|
||||
lineno_fmt = "%%%dd" if self.line_number is not None else "%%%ds"
|
||||
lineno_fmt = lineno_fmt % lineno_width
|
||||
fields.append(lineno_fmt % self.line_number)
|
||||
lineno = self.line_number if self.line_number is not None else '--'
|
||||
fields.append(lineno_fmt % lineno)
|
||||
else:
|
||||
fields.append(' ' * lineno_width)
|
||||
# Column: Label
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue