mirror of
https://github.com/python/cpython.git
synced 2025-08-22 17:55:18 +00:00
Issue #9738: PyUnicode_FromFormat() and PyErr_Format() raise an error on
a non-ASCII byte in the format string. Document also the encoding.
This commit is contained in:
parent
cd419abe42
commit
1205f2774e
8 changed files with 53 additions and 6 deletions
|
@ -550,8 +550,14 @@ PyAPI_FUNC(PyObject*) PyUnicode_FromObject(
|
|||
register PyObject *obj /* Object */
|
||||
);
|
||||
|
||||
PyAPI_FUNC(PyObject *) PyUnicode_FromFormatV(const char*, va_list);
|
||||
PyAPI_FUNC(PyObject *) PyUnicode_FromFormat(const char*, ...);
|
||||
PyAPI_FUNC(PyObject *) PyUnicode_FromFormatV(
|
||||
const char *format, /* ASCII-encoded string */
|
||||
va_list vargs
|
||||
);
|
||||
PyAPI_FUNC(PyObject *) PyUnicode_FromFormat(
|
||||
const char *format, /* ASCII-encoded string */
|
||||
...
|
||||
);
|
||||
|
||||
/* Format the object based on the format_spec, as defined in PEP 3101
|
||||
(Advanced String Formatting). */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue