]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.13] gh-137952: update `csv.Sniffer().has_header()` docs to describe the actual...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Wed, 12 Nov 2025 00:13:19 +0000 (01:13 +0100)
committerGitHub <noreply@github.com>
Wed, 12 Nov 2025 00:13:19 +0000 (16:13 -0800)
gh-137952: update `csv.Sniffer().has_header()` docs to describe the actual off-by-onish behavior (GH-137953)

* checks 21, not 20
* Say "header" instead of "first row" to disambiguate per review.

---------
(cherry picked from commit 0d7b48a8f5de5c1c6d57e1cf7194b6fb222d92e5)

Co-authored-by: Maurycy Pawłowski-Wieroński <maurycy@maurycy.com>
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Doc/library/csv.rst

index 3ea7cd210f729d6e678d02bc72c37afe89db3d34..4a033d823e6a7ee7f8be12d78b777f838a13e46c 100644 (file)
@@ -295,8 +295,8 @@ The :mod:`csv` module defines the following classes:
       - the second through n-th rows contain strings where at least one value's
         length differs from that of the putative header of that column.
 
-      Twenty rows after the first row are sampled; if more than half of columns +
-      rows meet the criteria, :const:`True` is returned.
+      Twenty-one rows after the header are sampled; if more than half of the
+      columns + rows meet the criteria, :const:`True` is returned.
 
    .. note::