Skip to content

Commit 52d552c

Browse files
koyuki7wskirpichev
andauthored
gh-127896: Add missing documentation of PySequence_In (GH-127979)
Co-authored-by: Sergey B Kirpichev <[email protected]>
1 parent 0d8e710 commit 52d552c

File tree

3 files changed

+15
-0
lines changed

3 files changed

+15
-0
lines changed

Doc/c-api/sequence.rst

+9
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,15 @@ Sequence Protocol
105105
equivalent to the Python expression ``value in o``.
106106
107107
108+
.. c:function:: int PySequence_In(PyObject *o, PyObject *value)
109+
110+
Alias for :c:func:`PySequence_Contains`.
111+
112+
.. deprecated:: 3.14
113+
The function is :term:`soft deprecated` and should no longer be used to
114+
write new code.
115+
116+
108117
.. c:function:: Py_ssize_t PySequence_Index(PyObject *o, PyObject *value)
109118
110119
Return the first index *i* for which ``o[i] == value``. On error, return

Doc/whatsnew/3.14.rst

+4
Original file line numberDiff line numberDiff line change
@@ -1073,6 +1073,10 @@ Deprecated
10731073
:c:macro:`!isfinite` available from :file:`math.h`
10741074
since C99. (Contributed by Sergey B Kirpichev in :gh:`119613`.)
10751075

1076+
* The previously undocumented function :c:func:`PySequence_In` is :term:`soft deprecated`.
1077+
Use :c:func:`PySequence_Contains` instead.
1078+
(Contributed by Yuki Kobayashi in :gh:`127896`.)
1079+
10761080
.. Add C API deprecations above alphabetically, not here at the end.
10771081
10781082
.. include:: ../deprecations/c-api-pending-removal-in-3.15.rst
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
The previously undocumented function :c:func:`PySequence_In` is :term:`soft deprecated`.
2+
Use :c:func:`PySequence_Contains` instead.

0 commit comments

Comments
 (0)