]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-152100: Support set operations in character classes (GH-152153)
authorSerhiy Storchaka <storchaka@gmail.com>
Thu, 25 Jun 2026 07:09:41 +0000 (10:09 +0300)
committerGitHub <noreply@github.com>
Thu, 25 Jun 2026 07:09:41 +0000 (10:09 +0300)
commitbd4bd3e76a684969022c00aafb8acf18006ac89b
tree5fc7c97f8819fb1553a92fbf393715bf2cef8b57
parenta6c2d4ae3bd744610e1a8b70396effdabca1593d
gh-152100: Support set operations in character classes (GH-152153)

Implement set difference [A--B], intersection [A&&B] and union [A||B] in
regular expression character classes (Unicode Technical Standard #18),
including nested, complemented and compound set operands.  Symmetric
difference [A~~B] remains reserved.

Also use the new syntax in the standard library (_strptime, textwrap,
doctest, pkgutil).

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Doc/library/re.rst
Doc/whatsnew/3.16.rst
Lib/_strptime.py
Lib/doctest.py
Lib/pkgutil.py
Lib/re/_parser.py
Lib/test/test_re.py
Lib/textwrap.py
Misc/NEWS.d/next/Library/2026-06-24-12-00-00.gh-issue-152100.Set0ps.rst [new file with mode: 0644]