summaryrefslogtreecommitdiff
path: root/Lib/traceback.py
diff options
context:
space:
mode:
authorEthan Furman <ethan@stoneleaf.us>2021-10-20 20:55:46 -0700
committerGitHub <noreply@github.com>2021-10-20 20:55:46 -0700
commitc52338fc42353e8d0c6214e4c22427807439dfd5 (patch)
tree6da4bf5da5eb739aa48eab1850218d5726c45b10 /Lib/traceback.py
parent8f05ffb0534c2343fc45ad0e1d91ae1dc2d92b64 (diff)
parent2a9ab75af32b1ee9f210ae2a0718990687d0f79d (diff)
downloadcpython-git-enum-private-310.tar.gz
Merge branch '3.10' into enum-private-310enum-private-310
Diffstat (limited to 'Lib/traceback.py')
-rw-r--r--Lib/traceback.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/traceback.py b/Lib/traceback.py
index c7947f118b..901b99476a 100644
--- a/Lib/traceback.py
+++ b/Lib/traceback.py
@@ -633,7 +633,7 @@ class TracebackException:
if self.offset is not None:
offset = self.offset
- end_offset = self.end_offset if self.end_offset is not None else offset
+ end_offset = self.end_offset if self.end_offset not in {None, 0} else offset
if offset == end_offset or end_offset == -1:
end_offset = offset + 1