Skip to content

CAT 032

unurgunite edited this page Jul 11, 2026 · 3 revisions

CAT-032 — split.first → split_limit

Severity: info | Confidence: medium | Auto-fix:

Description

split.first → split_limit — If only the first segment is needed, use .split with a limit argument to avoid parsing the entire string.

Bad code

str.split(":").first

Benchmark

Note

See bench results at bench/cat-032/

Clone this wiki locally