本文整理匯總了Python中sre_compile.SRE_FLAG_TEMPLATE屬性的典型用法代碼示例。如果您正苦於以下問題:Python sre_compile.SRE_FLAG_TEMPLATE屬性的具體用法?Python sre_compile.SRE_FLAG_TEMPLATE怎麽用?Python sre_compile.SRE_FLAG_TEMPLATE使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在類sre_compile
的用法示例。
在下文中一共展示了sre_compile.SRE_FLAG_TEMPLATE屬性的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: _re_transform
# 需要導入模塊: import sre_compile [as 別名]
# 或者: from sre_compile import SRE_FLAG_TEMPLATE [as 別名]
def _re_transform():
return astroid.parse('''
import sre_compile
ASCII = sre_compile.SRE_FLAG_ASCII
IGNORECASE = sre_compile.SRE_FLAG_IGNORECASE
LOCALE = sre_compile.SRE_FLAG_LOCALE
UNICODE = sre_compile.SRE_FLAG_UNICODE
MULTILINE = sre_compile.SRE_FLAG_MULTILINE
DOTALL = sre_compile.SRE_FLAG_DOTALL
VERBOSE = sre_compile.SRE_FLAG_VERBOSE
A = ASCII
I = IGNORECASE
L = LOCALE
U = UNICODE
M = MULTILINE
S = DOTALL
X = VERBOSE
TEMPLATE = sre_compile.SRE_FLAG_TEMPLATE
T = TEMPLATE
DEBUG = sre_compile.SRE_FLAG_DEBUG
''')
示例2: _re_transform
# 需要導入模塊: import sre_compile [as 別名]
# 或者: from sre_compile import SRE_FLAG_TEMPLATE [as 別名]
def _re_transform():
return astroid.parse(
"""
import sre_compile
ASCII = sre_compile.SRE_FLAG_ASCII
IGNORECASE = sre_compile.SRE_FLAG_IGNORECASE
LOCALE = sre_compile.SRE_FLAG_LOCALE
UNICODE = sre_compile.SRE_FLAG_UNICODE
MULTILINE = sre_compile.SRE_FLAG_MULTILINE
DOTALL = sre_compile.SRE_FLAG_DOTALL
VERBOSE = sre_compile.SRE_FLAG_VERBOSE
A = ASCII
I = IGNORECASE
L = LOCALE
U = UNICODE
M = MULTILINE
S = DOTALL
X = VERBOSE
TEMPLATE = sre_compile.SRE_FLAG_TEMPLATE
T = TEMPLATE
DEBUG = sre_compile.SRE_FLAG_DEBUG
"""
)