Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
57a5932f
Commit
57a5932f
authored
Sep 01, 2000
by
Moshe Zadka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update documentation for PyErr_Format, because the function has changed.
Connected to patch 100895
parent
9bfd2bf5
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
9 deletions
+19
-9
Doc/api/api.tex
Doc/api/api.tex
+19
-9
No files found.
Doc/api/api.tex
View file @
57a5932f
...
...
@@ -882,15 +882,25 @@ You need not increment its reference count.
\end{cfuncdesc}
\begin{cfuncdesc}
{
PyObject*
}{
PyErr
_
Format
}{
PyObject *exception,
const char *format, ...
}
This function sets the error indicator using a printf-style format
string. The first argument specifies the exception type and the
second argument specifies the format string for the exception. Any
subsequent arguments are converted to output by the C library's
\cfunction
{
vsprintf()
}
function. The buffer used internally by
\cfunction
{
PyErr
_
Format()
}
is 500 bytes long. The caller is
responsible for guaranteeing that the formatted output does not
overflow the buffer.
const char *format,
\moreargs
}
This function sets the error indicator.
\var
{
exception
}
should be a Python object.
\var
{
fmt
}
should be a string, containing format codes, similar to
\cfunction
{
printf
}
. The
\code
{
width.precision
}
before a format code
is parsed, but the width part is ignored.
\begin{tableii}
{
c|l
}{
character
}{
Character
}{
Meaning
}
\lineii
{
c
}{
Character, as an
\ctype
{
int
}
parameter
}
\lineii
{
d
}{
Number in decimal, as an
\ctype
{
int
}
parameter
}
\lineii
{
x
}{
Number in hexadecimal, as an
\ctype
{
int
}
parameter
}
\lineii
{
x
}{
A string, as a
\ctype
{
char *
}
parameter
}
\end{tableii}
An unrecognized format character causes all the rest of
the format string to be copied as-is to the result string,
and any extra arguments discarded.
A new reference is returned, which is owned by the caller.
\end{cfuncdesc}
\begin{cfuncdesc}
{
void
}{
PyErr
_
SetNone
}{
PyObject *type
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment