Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f07125e

Browse files
committed
PyErr_Format() does not return a new reference; it always returns NULL.
This closes SF bug #488387.
1 parent dbb53d9 commit f07125e

1 file changed

Lines changed: 5 additions & 7 deletions

File tree

Doc/api/exceptions.tex

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -121,11 +121,11 @@ \chapter{Exception Handling \label{exceptionHandling}}
121121

122122
\begin{cfuncdesc}{PyObject*}{PyErr_Format}{PyObject *exception,
123123
const char *format, \moreargs}
124-
This function sets the error indicator. \var{exception} should be a
125-
Python exception (string or class, not an instance). \var{format}
126-
should be a string, containing format codes, similar to
127-
\cfunction{printf()}. The \code{width.precision} before a format
128-
code is parsed, but the width part is ignored.
124+
This function sets the error indicator and returns \NULL..
125+
\var{exception} should be a Python exception (string or class, not
126+
an instance). \var{format} should be a string, containing format
127+
codes, similar to \cfunction{printf()}. The \code{width.precision}
128+
before a format code is parsed, but the width part is ignored.
129129

130130
\begin{tableii}{c|l}{character}{Character}{Meaning}
131131
\lineii{c}{Character, as an \ctype{int} parameter}
@@ -137,8 +137,6 @@ \chapter{Exception Handling \label{exceptionHandling}}
137137
An unrecognized format character causes all the rest of the format
138138
string to be copied as-is to the result string, and any extra
139139
arguments discarded.
140-
141-
A new reference is returned, which is owned by the caller.
142140
\end{cfuncdesc}
143141

144142
\begin{cfuncdesc}{void}{PyErr_SetNone}{PyObject *type}

0 commit comments

Comments
 (0)