On this page
sre_parse.fix_flags
Prev: sre_parse.error | Up: sre_parse | Next: sre_parse.parse
Rel: sre_parse.error, sre_parse.parse, sre_parse.parse_template, sre_parse.PatternError
Ref: docs.python.org — sre_parse.fix_flags
Tags: #public #python3 #stdlib #sre_parse
Import
import sre_parse
from sre_parse import fix_flags
Signature & Overview
sre_parse.fix_flags(src, flags)
sre_parse.fix_flags() function.
Usage
import re
# Pass flags directly to re.compile(pattern, re.IGNORECASE)
assert re.compile('a', re.IGNORECASE).flags & re.IGNORECASE
Gotchas
- Deprecated internal shim.
REPL Inspect
from sre_parse import fix_flags
help(fix_flags)
Linked from
- tuts/python3/stdlib_module/sre_parse
- tuts/python3/stdlib_module/sre_parse/error
- tuts/python3/stdlib_module/sre_parse/parse
- tuts/python3/stdlib_module/sre_parse/parse_template
- tuts/python3/stdlib_module/sre_parse/PatternError
- tuts/python3/stdlib_module/sre_parse/State
- tuts/python3/stdlib_module/sre_parse/SubPattern
- tuts/python3/stdlib_module/sre_parse/Tokenizer
Related notes
- tuts/python3/stdlib_module/sre_parse Linked here; links to this page; shared tags: #stdlib
- tuts/python3/stdlib_module/sre_parse/error Linked here; links to this page; shared tags: #stdlib
- tuts/python3/stdlib_module/sre_parse/parse Linked here; links to this page; shared tags: #stdlib
- tuts/python3/stdlib_module/sre_parse/parse_template Linked here; links to this page; shared tags: #stdlib
- tuts/python3/stdlib_module/sre_parse/PatternError Linked here; links to this page; shared tags: #stdlib
- tuts/python3/stdlib_module/sre_parse/State links to this page; shared tags: #stdlib
- tuts/python3/stdlib_module/sre_parse/SubPattern links to this page; shared tags: #stdlib
- tuts/python3/stdlib_module/sre_parse/Tokenizer links to this page; shared tags: #stdlib
- tuts/c/stdlib shared tags: #stdlib
- tuts/c/stdlib/assert shared tags: #stdlib