Skip to content

Commit 9878b37

Browse files
serhiy-storchakapicnixzStanFromIreland
authored
Apply suggestions from code review
Co-authored-by: Bénédikt Tran <[email protected]> Co-authored-by: Stan Ulbrych <[email protected]>
1 parent 6ad1ff6 commit 9878b37

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

Doc/c-api/arg.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -344,17 +344,17 @@ Other objects
344344
in *items*. The C arguments must correspond to the individual format units in
345345
*items*. Format units for sequences may be nested.
346346

347-
If *items* contains format units which store
347+
If *items* contains format units which store a
348348
:ref:`borrowed buffer <c-arg-borrowed-buffer>` or
349-
:term:`reference <borrowed reference>`
349+
a :term:`borrowed reference`
350350
(``y``, ``y#``, ``s``, ``s#``, ``z``, ``z#``, ``S``, ``Y``, ``U``,
351-
``O`` or ``O!``) the object must be a Python tuple.
351+
``O`` or ``O!``), the object must be a Python tuple.
352352
The *converter* for the ``O&`` format unit in *items* must not store
353-
borrowed buffer or reference.
353+
a borrowed buffer or reference.
354354

355355
.. deprecated:: next
356356
Non-tuple sequences are deprecated if *items* contains format units
357-
which store borrowed buffer or reference.
357+
which store a borrowed buffer or reference.
358358

359359
It is possible to pass "long" integers (integers whose value exceeds the
360360
platform's :c:macro:`LONG_MAX`) however no proper range checking is done --- the

Doc/whatsnew/3.14.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1230,8 +1230,8 @@ Deprecated
12301230
* Non-tuple sequences are deprecated as argument for the ``(items)``
12311231
format unit in :c:func:`PyArg_ParseTuple` and other
12321232
:ref:`argument parsing <arg-parsing>` functions if *items* contains
1233-
format units which store :ref:`borrowed buffer <c-arg-borrowed-buffer>` or
1234-
:term:`reference <borrowed reference>`.
1233+
format units which store a :ref:`borrowed buffer <c-arg-borrowed-buffer>`
1234+
or a :term:`borrowed reference`.
12351235
(Contributed by Serhiy Storchaka in :gh:`50333`.)
12361236

12371237
* The previously undocumented function :c:func:`PySequence_In` is :term:`soft deprecated`.

Lib/test/test_capi/test_getargs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -590,7 +590,7 @@ def test_tuple(self):
590590
ret = getargs_tuple(1, (2, 3))
591591
self.assertEqual(ret, (1,2,3))
592592

593-
# make sure invalid tuple arguments are handled correctly
593+
# make sure invalid sequence arguments are handled correctly
594594
class TestSeq:
595595
def __len__(self):
596596
return 2
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Non-tuple sequences are deprecated as argument for the ``(items)`` format
22
unit in :c:func:`PyArg_ParseTuple` and other :ref:`argument parsing
33
<arg-parsing>` functions if *items* contains format units which store
4-
:ref:`borrowed buffer <c-arg-borrowed-buffer>` or :term:`reference <borrowed
5-
reference>`.
4+
a :ref:`borrowed buffer <c-arg-borrowed-buffer>` or a :term:`borrowed
5+
reference`.

0 commit comments

Comments
 (0)