Visitar URL original
gh-98254: Include stdlib module names in error messages for NameErrors by pablogsal · Pull Request #98255 · python/cpython · GitHub
Skip to content
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
Update Python/suggestions.c
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
  • Loading branch information
pablogsal and JelleZijlstra authored Oct 15, 2022
commit 06cda71630ed4bd357cb05bc8618b06d92a9d14a
2 changes: 1 addition & 1 deletion Python/suggestions.c
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ offer_suggestions_for_attribute_error(PyAttributeErrorObject *exc)
return NULL;
}
// Add a trailer ". Did you mean: (...)?"
PyObject* result = PyUnicode_FromFormat(". Did you mean: %R?", suggestion);
PyObject* result = PyUnicode_FromFormat(". Did you mean: %R?", suggestion);
Py_DECREF(suggestion);
return result;
}
Expand Down