mirror of
https://github.com/python/cpython.git
synced 2025-08-02 16:13:13 +00:00
For PyErr_Format(), note that the exception parameter can be a string or
class, but not an instance (since an instance will be created using the formatted message string as the constructor parameter).
This commit is contained in:
parent
3c8c2f9b77
commit
89fb035248
1 changed files with 2 additions and 2 deletions
|
@ -882,8 +882,8 @@ You need not increment its reference count.
|
||||||
|
|
||||||
\begin{cfuncdesc}{PyObject*}{PyErr_Format}{PyObject *exception,
|
\begin{cfuncdesc}{PyObject*}{PyErr_Format}{PyObject *exception,
|
||||||
const char *format, \moreargs}
|
const char *format, \moreargs}
|
||||||
This function sets the error indicator.
|
This function sets the error indicator. \var{exception} should be a
|
||||||
\var{exception} should be a Python object.
|
Python exception (string or class, not an instance).
|
||||||
\var{fmt} should be a string, containing format codes, similar to
|
\var{fmt} should be a string, containing format codes, similar to
|
||||||
\cfunction{printf}. The \code{width.precision} before a format code
|
\cfunction{printf}. The \code{width.precision} before a format code
|
||||||
is parsed, but the width part is ignored.
|
is parsed, but the width part is ignored.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue