8000 bpo-43933: Show frame.f_lineno as None, rather than -1, if there is no line number. by markshannon · Pull Request #25717 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

bpo-43933: Show frame.f_lineno as None, rather than -1, if there is no line number. #25717

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 29, 2021
Merged
Changes from 1 commit
Commits
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
Don't recompute line number.
  • Loading branch information
markshannon committed Apr 29, 2021
commit 275291608cc364e5e6e35ea26540a08ad846cbbb
2 changes: 1 addition & 1 deletion Objects/frameobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ frame_getlineno(PyFrameObject *f, void *closure)
Py_RETURN_NONE;
}
else {
return PyLong_FromLong(PyFrame_GetLineNumber(f));
return PyLong_FromLong(lineno);
}
}

Expand Down
0