mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Minor fixes to C API docs (GH-31501)
* C API docs: move PyErr_SetImportErrorSubclass docs It was in the section about warnings, but it makes more sense to put it with PyErr_SetImportError. * C API docs: document closeit argument to PyRun_AnyFileExFlags It was already documented for PyRun_SimpleFileExFlags. * textual fixes to unicode docs * Move paragraph about tp_dealloc into tp_dealloc section * __aiter__ returns an async iterator, not an awaitable
This commit is contained in:
parent
1935e1cc28
commit
43cf44ddcc
4 changed files with 28 additions and 24 deletions
|
@ -253,6 +253,14 @@ For convenience, some of these functions will always return a
|
|||
.. versionadded:: 3.3
|
||||
|
||||
|
||||
.. c:function:: PyObject* PyErr_SetImportErrorSubclass(PyObject *exception, PyObject *msg, PyObject *name, PyObject *path)
|
||||
|
||||
Much like :c:func:`PyErr_SetImportError` but this function allows for
|
||||
specifying a subclass of :exc:`ImportError` to raise.
|
||||
|
||||
.. versionadded:: 3.6
|
||||
|
||||
|
||||
.. c:function:: void PyErr_SyntaxLocationObject(PyObject *filename, int lineno, int col_offset)
|
||||
|
||||
Set file, line, and offset information for the current exception. If the
|
||||
|
@ -320,13 +328,6 @@ an error value).
|
|||
:mod:`warnings` module and the :option:`-W` option in the command line
|
||||
documentation. There is no C API for warning control.
|
||||
|
||||
.. c:function:: PyObject* PyErr_SetImportErrorSubclass(PyObject *exception, PyObject *msg, PyObject *name, PyObject *path)
|
||||
|
||||
Much like :c:func:`PyErr_SetImportError` but this function allows for
|
||||
specifying a subclass of :exc:`ImportError` to raise.
|
||||
|
||||
.. versionadded:: 3.6
|
||||
|
||||
|
||||
.. c:function:: int PyErr_WarnExplicitObject(PyObject *category, PyObject *message, PyObject *filename, int lineno, PyObject *module, PyObject *registry)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue