diff options
| author | Antoine Pitrou <solipsis@pitrou.net> | 2008-08-19 17:56:33 +0000 |
|---|---|---|
| committer | Antoine Pitrou <solipsis@pitrou.net> | 2008-08-19 17:56:33 +0000 |
| commit | fd036451bf0e0ade8783e21df801abf7be96d020 (patch) | |
| tree | e70ff65a9e641d8e790bc091f0dc2507baf344ca /Lib/sre_constants.py | |
| parent | 3ad7ba10a20827b24d4b1aa9dd49474db8affbdd (diff) | |
| download | cpython-git-fd036451bf0e0ade8783e21df801abf7be96d020.tar.gz | |
#2834: Change re module semantics, so that str and bytes mixing is forbidden,
and str (unicode) patterns get full unicode matching by default. The re.ASCII
flag is also introduced to ask for ASCII matching instead.
Diffstat (limited to 'Lib/sre_constants.py')
| -rw-r--r-- | Lib/sre_constants.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/sre_constants.py b/Lib/sre_constants.py index 94962cbc39..6cf69c321b 100644 --- a/Lib/sre_constants.py +++ b/Lib/sre_constants.py @@ -207,9 +207,10 @@ SRE_FLAG_IGNORECASE = 2 # case insensitive SRE_FLAG_LOCALE = 4 # honour system locale SRE_FLAG_MULTILINE = 8 # treat target as multiline string SRE_FLAG_DOTALL = 16 # treat target as a single string -SRE_FLAG_UNICODE = 32 # use unicode locale +SRE_FLAG_UNICODE = 32 # use unicode "locale" SRE_FLAG_VERBOSE = 64 # ignore whitespace and comments SRE_FLAG_DEBUG = 128 # debugging +SRE_FLAG_ASCII = 256 # use ascii "locale" # flags for INFO primitive SRE_INFO_PREFIX = 1 # has prefix |
