8000 gh-111513: Improve datetime.fromtimestamp's error message by aisk · Pull Request #124249 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-111513: Improve datetime.fromtimestamp's error message #124249

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 5 commits into from
Sep 20, 2024
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
Utilize PEP737 formatter
Co-authored-by: Victor Stinner <vstinner@python.org>
  • Loading branch information
aisk and vstinner authored Sep 20, 2024
commit 37790c84dfa171bd1b168c48d08130d1e2a58457
3 changes: 1 addition & 2 deletions Python/pytime.c
Original file line number Diff line number Diff line change
Expand Up @@ -389,8 +389,7 @@ pytime_object_to_denominator(PyObject *obj, time_t *sec, long *numerator,
if (*sec == (time_t)-1 && PyErr_Occurred()) {
if (PyErr_ExceptionMatches(PyExc_TypeError)) {
PyErr_Format(PyExc_TypeError,
"argument must be int or float, not %.200s",
Py_TYPE(obj)->tp_name);
"argument must be int or float, not %T", obj);
}
return -1;
}
Expand Down
Loading
0