FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

`csv.Sniffer._guess_delimiter()` iterates over all ASCII on each line · Issue #137627 · python/cpython · GitHub

Repository navigation

csv.Sniffer._guess_delimiter() iterates over all ASCII on each line #137627

Closed

Description

Bug report

Bug description:

I know that there were discussions about rewriting CSV Sniffer, and they seem to be on hold, to avoid breaking any code relying on its behavior.

I believe it's possible, though, to still make it significantly faster.

The current code iterates over 127 ASCII characters and counts their occurences on each line, even if they're not present:

for char in ascii:

It's highly inefficient. We can count only present characters, and backfill zeros.

CPython versions tested on:

3.15

Operating systems tested on:

macOS

Linked PRs

Activity

  1. added
    stdlibStandard Library Python modules in the Lib/ directory
    on Aug 11, 2025
  2. added a commit that references this issue on Oct 23, 2025
  3. maurycy commented on Oct 23, 2025

    ContributorAuthor

    #137628 is merged, so closing this as completed.

  4. added a commit that references this issue on Dec 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    stdlibStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or error

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


    Back | FazBrowse Home | New Git URL