summaryrefslogtreecommitdiff
path: root/Lib/re.py
diff options
context:
space:
mode:
authorandrei kulakov <andrei.avk@gmail.com>2022-02-04 22:54:28 -0500
committerGitHub <noreply@github.com>2022-02-04 19:54:28 -0800
commitfea7290a0ecee09bbce571d4d10f5881b7ea3485 (patch)
tree463766aa964faf353c68e991c0567da5852d66dd /Lib/re.py
parentbf95ff91f2c1fc5a57190491f9ccdc63458b089e (diff)
downloadcpython-git-fea7290a0ecee09bbce571d4d10f5881b7ea3485.tar.gz
bpo-31369: include ``RegexFlag`` in ``re.__all__`` (GH-30279)
* added RegexFlag to re.__all__; added RegexFlag.NOFLAG Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Diffstat (limited to 'Lib/re.py')
-rw-r--r--Lib/re.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/re.py b/Lib/re.py
index a7ab9b3706..e9a745dc58 100644
--- a/Lib/re.py
+++ b/Lib/re.py
@@ -137,7 +137,7 @@ __all__ = [
"findall", "finditer", "compile", "purge", "template", "escape",
"error", "Pattern", "Match", "A", "I", "L", "M", "S", "X", "U",
"ASCII", "IGNORECASE", "LOCALE", "MULTILINE", "DOTALL", "VERBOSE",
- "UNICODE",
+ "UNICODE", "NOFLAG", "RegexFlag",
]
__version__ = "2.2.1"
@@ -145,6 +145,7 @@ __version__ = "2.2.1"
@enum.global_enum
@enum._simple_enum(enum.IntFlag, boundary=enum.KEEP)
class RegexFlag:
+ NOFLAG = 0
ASCII = A = sre_compile.SRE_FLAG_ASCII # assume ascii "locale"
IGNORECASE = I = sre_compile.SRE_FLAG_IGNORECASE # ignore case
LOCALE = L = sre_compile.SRE_FLAG_LOCALE # assume current 8-bit locale