Skip to content

Commit 8fa5ece

Browse files
authored
gh-123378: fix post-merge typos in comments and NEWS (#127739)
1 parent 1503fc8 commit 8fa5ece

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Misc/NEWS.d/next/C_API/2024-08-27-09-07-56.gh-issue-123378.JJ6n_u.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Ensure that the value of :attr:`UnicodeEncodeError.start <UnicodeError.start>`
2-
retrieved by :c:func:`PyUnicodeEncodeError_GetStart` lie in
2+
retrieved by :c:func:`PyUnicodeEncodeError_GetStart` lies in
33
``[0, max(0, objlen - 1)]`` where *objlen* is the length of
44
:attr:`UnicodeEncodeError.object <UnicodeError.object>`. Similar
55
arguments apply to :exc:`UnicodeDecodeError` and :exc:`UnicodeTranslateError`

Objects/exceptions.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2712,7 +2712,7 @@ set_unicodefromstring(PyObject **attr, const char *value)
27122712
* Adjust the (inclusive) 'start' value of a UnicodeError object.
27132713
*
27142714
* The 'start' can be negative or not, but when adjusting the value,
2715-
* we clip it in [0, max(0, objlen - 1)] but do not intepret it as
2715+
* we clip it in [0, max(0, objlen - 1)] and do not interpret it as
27162716
* a relative offset.
27172717
*/
27182718
static inline Py_ssize_t
@@ -2732,8 +2732,8 @@ unicode_error_adjust_start(Py_ssize_t start, Py_ssize_t objlen)
27322732
* Adjust the (exclusive) 'end' value of a UnicodeError object.
27332733
*
27342734
* The 'end' can be negative or not, but when adjusting the value,
2735-
* we clip it in [min(1, objlen), max(min(1, objlen), objlen)] but
2736-
* do not intepret it as a relative offset.
2735+
* we clip it in [min(1, objlen), max(min(1, objlen), objlen)] and
2736+
* do not interpret it as a relative offset.
27372737
*/
27382738
static inline Py_ssize_t
27392739
unicode_error_adjust_end(Py_ssize_t end, Py_ssize_t objlen)

0 commit comments

Comments
 (0)