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:
Victor Stinner 2010-09-11 00:54:47 +00:00
parent cd419abe42
commit 1205f2774e
8 changed files with 53 additions and 6 deletions

View file

@ -146,7 +146,7 @@ in various ways. There is a separate error indicator for each thread.
.. cfunction:: PyObject* PyErr_Format(PyObject *exception, const char *format, ...)
This function sets the error indicator and returns *NULL*. *exception* should be
a Python exception (class, not an instance). *format* should be a string,
a Python exception (class, not an instance). *format* should be an ASCII-encoded string,
containing format codes, similar to :cfunc:`printf`. The ``width.precision``
before a format code is parsed, but the width part is ignored.