mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
More minor fixes to C API docs (GH-31525)
* wording fixes in type.rst * grammar and punctuation in sys.rst * set: grammar fixes * structures: capitalization fix * grammar fixes for sequence * objects: point to Py_TYPE instead of direct object access * numbers: add more explicit Python equivalences * method: add missing period * memory: grammar fix * mapping: grammar fixes * long: grammar fix * iter: fix grammar for PyAIter_Check * init: grammar fix
This commit is contained in:
parent
6066739ff7
commit
897bc6f928
13 changed files with 30 additions and 29 deletions
|
@ -93,7 +93,7 @@ Object Protocol
|
|||
return ``0`` on success. This is the equivalent of the Python statement
|
||||
``o.attr_name = v``.
|
||||
|
||||
If *v* is ``NULL``, the attribute is deleted, however this feature is
|
||||
If *v* is ``NULL``, the attribute is deleted, but this feature is
|
||||
deprecated in favour of using :c:func:`PyObject_DelAttrString`.
|
||||
|
||||
|
||||
|
@ -291,7 +291,7 @@ Object Protocol
|
|||
of object *o*. On failure, raises :exc:`SystemError` and returns ``NULL``. This
|
||||
is equivalent to the Python expression ``type(o)``. This function increments the
|
||||
reference count of the return value. There's really no reason to use this
|
||||
function instead of the common expression ``o->ob_type``, which returns a
|
||||
function instead of the :c:func:`Py_TYPE()` function, which returns a
|
||||
pointer of type :c:type:`PyTypeObject*`, except when the incremented reference
|
||||
count is needed.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue