mirror of
https://github.com/python/cpython.git
synced 2025-07-08 03:45:36 +00:00
bpo-25460: Surround suggestions by quotes (GH-25473)
This commit is contained in:
parent
4f9ffa8f9c
commit
7a04116246
2 changed files with 16 additions and 16 deletions
|
@ -956,10 +956,10 @@ print_exception(PyObject *f, PyObject *value)
|
|||
PyObject* suggestions = _Py_Offer_Suggestions(value);
|
||||
if (suggestions) {
|
||||
// Add a trailer ". Did you mean: (...)?"
|
||||
err = PyFile_WriteString(". Did you mean: ", f);
|
||||
err = PyFile_WriteString(". Did you mean: '", f);
|
||||
if (err == 0) {
|
||||
err = PyFile_WriteObject(suggestions, f, Py_PRINT_RAW);
|
||||
err += PyFile_WriteString("?", f);
|
||||
err += PyFile_WriteString("'?", f);
|
||||
}
|
||||
Py_DECREF(suggestions);
|
||||
} else if (PyErr_Occurred()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue