mirror of
https://github.com/python/cpython.git
synced 2025-11-25 04:34:37 +00:00
Some cleanup in the docs.
This commit is contained in:
parent
28c7bcf38e
commit
b19be571e0
126 changed files with 804 additions and 1181 deletions
|
|
@ -37,8 +37,8 @@ Python variables ``sys.exc_type``, ``sys.exc_value`` and ``sys.exc_traceback``.
|
|||
API functions exist to interact with the error indicator in various ways. There
|
||||
is a separate error indicator for each thread.
|
||||
|
||||
.. % XXX Order of these should be more thoughtful.
|
||||
.. % Either alphabetical or some kind of structure.
|
||||
.. XXX Order of these should be more thoughtful.
|
||||
Either alphabetical or some kind of structure.
|
||||
|
||||
|
||||
.. cfunction:: void PyErr_Print()
|
||||
|
|
|
|||
|
|
@ -266,7 +266,7 @@ Initialization, Finalization, and Threads
|
|||
as the list ``sys.path``, which may be modified to change the future search path
|
||||
for loaded modules.
|
||||
|
||||
.. % XXX should give the exact rules
|
||||
.. XXX should give the exact rules
|
||||
|
||||
|
||||
.. cfunction:: const char* Py_GetVersion()
|
||||
|
|
@ -361,8 +361,8 @@ Initialization, Finalization, and Threads
|
|||
to initialize ``sys.argv``, a fatal condition is signalled using
|
||||
:cfunc:`Py_FatalError`.
|
||||
|
||||
.. % XXX impl. doesn't seem consistent in allowing 0/NULL for the params;
|
||||
.. % check w/ Guido.
|
||||
.. XXX impl. doesn't seem consistent in allowing 0/NULL for the params;
|
||||
check w/ Guido.
|
||||
|
||||
|
||||
.. _threads:
|
||||
|
|
|
|||
|
|
@ -489,7 +489,7 @@ Here is the corresponding C code, in all its glory::
|
|||
single: PyErr_Clear()
|
||||
single: Py_XDECREF()
|
||||
|
||||
This example represents an endorsed use of the :keyword:`goto` statement in C!
|
||||
This example represents an endorsed use of the ``goto`` statement in C!
|
||||
It illustrates the use of :cfunc:`PyErr_ExceptionMatches` and
|
||||
:cfunc:`PyErr_Clear` to handle specific exceptions, and the use of
|
||||
:cfunc:`Py_XDECREF` to dispose of owned references that may be *NULL* (note the
|
||||
|
|
|
|||
|
|
@ -476,7 +476,7 @@ type objects) *must* have the :attr:`ob_size` field.
|
|||
declare the instance struct) and this in turn includes the :attr:`_ob_prev` and
|
||||
:attr:`_ob_next` fields if they are present. This means that the only correct
|
||||
way to get an initializer for the :attr:`tp_basicsize` is to use the
|
||||
:keyword:`sizeof` operator on the struct used to declare the instance layout.
|
||||
``sizeof`` operator on the struct used to declare the instance layout.
|
||||
The basic size does not include the GC header size (this is new in Python 2.2;
|
||||
in 2.1 and 2.0, the GC header size was included in :attr:`tp_basicsize`).
|
||||
|
||||
|
|
@ -1175,7 +1175,7 @@ The next fields, up to and including :attr:`tp_weaklist`, only exist if the
|
|||
|
||||
PyObject * tp_descr_get(PyObject *self, PyObject *obj, PyObject *type);
|
||||
|
||||
XXX blah, blah.
|
||||
XXX explain.
|
||||
|
||||
This field is inherited by subtypes.
|
||||
|
||||
|
|
@ -1190,7 +1190,7 @@ The next fields, up to and including :attr:`tp_weaklist`, only exist if the
|
|||
|
||||
This field is inherited by subtypes.
|
||||
|
||||
XXX blah, blah.
|
||||
XXX explain.
|
||||
|
||||
|
||||
.. cmember:: long PyTypeObject.tp_dictoffset
|
||||
|
|
@ -1734,10 +1734,9 @@ member in the :ctype:`PyTypeObject` structure should be *NULL*. Otherwise, the
|
|||
and :exc:`SystemError` should be raised when *segment* specifies a segment that
|
||||
doesn't exist.
|
||||
|
||||
.. % Why doesn't it raise ValueError for this one?
|
||||
.. % GJS: because you shouldn't be calling it with an invalid
|
||||
.. % segment. That indicates a blatant programming error in the C
|
||||
.. % code.
|
||||
.. Why doesn't it raise ValueError for this one?
|
||||
GJS: because you shouldn't be calling it with an invalid
|
||||
segment. That indicates a blatant programming error in the C code.
|
||||
|
||||
|
||||
.. ctype:: Py_ssize_t (*segcountproc) (PyObject *self, Py_ssize_t *lenp)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue