diff options
author | Jelle Zijlstra <jelle.zijlstra@gmail.com> | 2022-04-02 19:31:05 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-02 19:31:05 (GMT) |
commit | 897bc6f9282238d5fb32d232ab62d30675244736 (patch) | |
tree | bf6b3999652c62688e44820d7e2f40268dfa9480 /Doc/c-api/set.rst | |
parent | 6066739ff7794e54c98c08b953a699cbc961cd28 (diff) | |
download | cpython-897bc6f9282238d5fb32d232ab62d30675244736.zip cpython-897bc6f9282238d5fb32d232ab62d30675244736.tar.gz cpython-897bc6f9282238d5fb32d232ab62d30675244736.tar.bz2 |
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
Diffstat (limited to 'Doc/c-api/set.rst')
-rw-r--r-- | Doc/c-api/set.rst | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Doc/c-api/set.rst b/Doc/c-api/set.rst index eca19c4..f0d905b 100644 --- a/Doc/c-api/set.rst +++ b/Doc/c-api/set.rst @@ -13,7 +13,7 @@ Set Objects object: frozenset This section details the public API for :class:`set` and :class:`frozenset` -objects. Any functionality not listed below is best accessed using the either +objects. Any functionality not listed below is best accessed using either the abstract object protocol (including :c:func:`PyObject_CallMethod`, :c:func:`PyObject_RichCompareBool`, :c:func:`PyObject_Hash`, :c:func:`PyObject_Repr`, :c:func:`PyObject_IsTrue`, :c:func:`PyObject_Print`, and @@ -31,7 +31,7 @@ the abstract object protocol (including :c:func:`PyObject_CallMethod`, in that it is a fixed size for small sets (much like tuple storage) and will point to a separate, variable sized block of memory for medium and large sized sets (much like list storage). None of the fields of this structure should be - considered public and are subject to change. All access should be done through + considered public and all are subject to change. All access should be done through the documented API rather than by manipulating the values in the structure. @@ -131,7 +131,7 @@ or :class:`frozenset` or instances of their subtypes. .. c:function:: int PySet_Add(PyObject *set, PyObject *key) Add *key* to a :class:`set` instance. Also works with :class:`frozenset` - instances (like :c:func:`PyTuple_SetItem` it can be used to fill-in the values + instances (like :c:func:`PyTuple_SetItem` it can be used to fill in the values of brand new frozensets before they are exposed to other code). Return ``0`` on success or ``-1`` on failure. Raise a :exc:`TypeError` if the *key* is unhashable. Raise a :exc:`MemoryError` if there is no room to grow. Raise a |