Skip to content

Commit

Permalink
bpo-31780: Fix incorrect error message for ',x', ',b', ',o' specs (#4002
Browse files Browse the repository at this point in the history
)

Patch by Pablo.
  • Loading branch information
pablogsal authored and terryjreedy committed Oct 15, 2017
1 parent 620f70e commit 28773ca
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Python/formatter_unicode.c
Expand Up @@ -32,11 +32,11 @@ invalid_comma_type(Py_UCS4 presentation_type)
{
if (presentation_type > 32 && presentation_type < 128)
PyErr_Format(PyExc_ValueError,
"Cannot specify ',' or '_' with '%c'.",
"Cannot specify ',' with '%c'.",
(char)presentation_type);
else
PyErr_Format(PyExc_ValueError,
"Cannot specify ',' or '_' with '\\x%x'.",
"Cannot specify ',' with '\\x%x'.",
(unsigned int)presentation_type);
}

Expand Down

0 comments on commit 28773ca

Please sign in to comment.