cpython/Lib/re
Pieter Eendebak 21c4b7359d
gh-152056: Compile single-category character sets to a bare CATEGORY opcode (GH-152057)
A character set containing exactly one category, e.g. [\d] or [^\s], now
compiles to a single CATEGORY opcode (like \d or \S) instead of an IN
block.  The negated form maps to the complementary category.  This speeds
up matching and reduces the size of the compiled byte code.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-24 11:09:50 +00:00
..
__init__.py gh-86519: Add prefixmatch APIs to the re module (GH-31137) 2026-02-15 17:43:39 -08:00
_casefix.py Fix syntax in generate_re_casefix.py (#122699) 2024-08-05 23:16:29 -07:00
_compiler.py gh-152033: Optimize category escapes outside character sets (GH-152035) 2026-06-24 08:49:14 +03:00
_constants.py gh-111259: Optimize complementary character sets in RE (GH-120742) 2024-06-20 07:19:32 +00:00
_parser.py gh-152056: Compile single-category character sets to a bare CATEGORY opcode (GH-152057) 2026-06-24 11:09:50 +00:00