mirror of
https://github.com/python/cpython.git
synced 2025-07-07 19:35:27 +00:00
gh-127896: Add missing documentation of PySequence_In
(GH-127979)
Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
This commit is contained in:
parent
0d8e7106c2
commit
52d552cda7
3 changed files with 15 additions and 0 deletions
|
@ -105,6 +105,15 @@ Sequence Protocol
|
|||
equivalent to the Python expression ``value in o``.
|
||||
|
||||
|
||||
.. c:function:: int PySequence_In(PyObject *o, PyObject *value)
|
||||
|
||||
Alias for :c:func:`PySequence_Contains`.
|
||||
|
||||
.. deprecated:: 3.14
|
||||
The function is :term:`soft deprecated` and should no longer be used to
|
||||
write new code.
|
||||
|
||||
|
||||
.. c:function:: Py_ssize_t PySequence_Index(PyObject *o, PyObject *value)
|
||||
|
||||
Return the first index *i* for which ``o[i] == value``. On error, return
|
||||
|
|
|
@ -1073,6 +1073,10 @@ Deprecated
|
|||
:c:macro:`!isfinite` available from :file:`math.h`
|
||||
since C99. (Contributed by Sergey B Kirpichev in :gh:`119613`.)
|
||||
|
||||
* The previously undocumented function :c:func:`PySequence_In` is :term:`soft deprecated`.
|
||||
Use :c:func:`PySequence_Contains` instead.
|
||||
(Contributed by Yuki Kobayashi in :gh:`127896`.)
|
||||
|
||||
.. Add C API deprecations above alphabetically, not here at the end.
|
||||
|
||||
.. include:: ../deprecations/c-api-pending-removal-in-3.15.rst
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
The previously undocumented function :c:func:`PySequence_In` is :term:`soft deprecated`.
|
||||
Use :c:func:`PySequence_Contains` instead.
|
Loading…
Add table
Add a link
Reference in a new issue