From 93db6c430fcc12577a4525e65c8f4215150c03f1 Mon Sep 17 00:00:00 2001 From: kovan Date: Tue, 3 Feb 2026 23:22:38 +0100 Subject: [PATCH] gh-140922: Document fnmatch.translate \Z to \z change in 3.14 Add versionchanged note explaining that fnmatch.translate() now generates regular expressions using \z instead of \Z. Both are equivalent; \Z is still accepted for compatibility. Co-Authored-By: Claude Opus 4.5 --- Doc/library/fnmatch.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Doc/library/fnmatch.rst b/Doc/library/fnmatch.rst index ee654b7a83e203..b8f3f98e239b71 100644 --- a/Doc/library/fnmatch.rst +++ b/Doc/library/fnmatch.rst @@ -116,6 +116,10 @@ functions: :func:`fnmatch`, :func:`fnmatchcase`, :func:`.filter`, :func:`.filter >>> reobj.match('foobar.txt') + .. versionchanged:: 3.14 + The generated regular expression now uses ``\z`` instead of ``\Z``. + Both are equivalent; ``\Z`` is still accepted for compatibility. + .. seealso::