summaryrefslogtreecommitdiffstats
path: root/Lib/dis.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/dis.py')
-rw-r--r--Lib/dis.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/dis.py b/Lib/dis.py
index c05b8e0..c8313ac 100644
--- a/Lib/dis.py
+++ b/Lib/dis.py
@@ -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