mirror of
https://github.com/python/cpython.git
synced 2025-10-09 08:31:26 +00:00
#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.
This commit is contained in:
parent
3ad7ba10a2
commit
fd036451bf
37 changed files with 280 additions and 163 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue