Skip to content

Commit b86007d

Browse files
authored
Merge branch 'main' into main
2 parents caa1c98 + 3eecc72 commit b86007d

File tree

5 files changed

+6
-6
lines changed

5 files changed

+6
-6
lines changed

Doc/library/itertools.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ Iterator Arguments Results
4747
Iterator Arguments Results Example
4848
============================ ============================ ================================================= =============================================================
4949
:func:`accumulate` p [,func] p0, p0+p1, p0+p1+p2, ... ``accumulate([1,2,3,4,5]) → 1 3 6 10 15``
50-
:func:`batched` p, n (p0, p1, ..., p_n-1), ... ``batched('ABCDEFG', n=3) → ABC DEF G``
50+
:func:`batched` p, n (p0, p1, ..., p_n-1), ... ``batched('ABCDEFG', n=2) → AB CD EF G``
5151
:func:`chain` p, q, ... p0, p1, ... plast, q0, q1, ... ``chain('ABC', 'DEF') → A B C D E F``
5252
:func:`chain.from_iterable` iterable p0, p1, ... plast, q0, q1, ... ``chain.from_iterable(['ABC', 'DEF']) → A B C D E F``
5353
:func:`compress` data, selectors (d[0] if s[0]), (d[1] if s[1]), ... ``compress('ABCDEF', [1,0,1,0,1,1]) → A C E F``
@@ -181,7 +181,7 @@ loops that truncate the stream.
181181
Roughly equivalent to::
182182

183183
def batched(iterable, n, *, strict=False):
184-
# batched('ABCDEFG', 3) → ABC DEF G
184+
# batched('ABCDEFG', 2) → AB CD EF G
185185
if n < 1:
186186
raise ValueError('n must be at least one')
187187
iterator = iter(iterable)

Lib/test/test_ast/test_ast.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3545,7 +3545,7 @@ def test_show_empty_flag(self):
35453545
self.check_output(source, expect, '--show-empty')
35463546

35473547

3548-
class ASTOptimiziationTests(unittest.TestCase):
3548+
class ASTOptimizationTests(unittest.TestCase):
35493549
def wrap_expr(self, expr):
35503550
return ast.Module(body=[ast.Expr(value=expr)])
35513551

Modules/_ctypes/stgdict.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -484,7 +484,7 @@ error:;
484484

485485
/*
486486
Replace array elements at stginfo->ffi_type_pointer.elements.
487-
Return -1 if error occured.
487+
Return -1 if error occurred.
488488
*/
489489
int
490490
_replace_array_elements(ctypes_state *st, PyObject *layout_fields,

Modules/_interpretersmodule.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -666,7 +666,7 @@ _run_in_interpreter(PyThreadState *tstate, PyInterpreterState *interp,
666666

667667
// Prep and switch interpreters.
668668
if (_PyXI_Enter(session, interp, shareables, &result) < 0) {
669-
// If an error occured at this step, it means that interp
669+
// If an error occurred at this step, it means that interp
670670
// was not prepared and switched.
671671
_PyXI_FreeSession(session);
672672
_PyXI_FreeFailure(failure);

Tools/peg_generator/pegen/parser_generator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def visit_NamedItem(self, item: NamedItem) -> None:
5656

5757

5858
class KeywordCollectorVisitor(GrammarVisitor):
59-
"""Visitor that collects all the keywods and soft keywords in the Grammar"""
59+
"""Visitor that collects all the keywords and soft keywords in the Grammar"""
6060

6161
def __init__(self, gen: "ParserGenerator", keywords: Dict[str, int], soft_keywords: Set[str]):
6262
self.generator = gen

0 commit comments

Comments
 (0)