add re.template (#1330)

This commit is contained in:
Jelle Zijlstra
2017-05-24 14:07:31 -07:00
committed by Guido van Rossum
parent 890190d349
commit 89f27742ca
2 changed files with 5 additions and 1 deletions

View File

@@ -97,3 +97,4 @@ def subn(pattern: Union[Pattern[str], Pattern[unicode]], repl: Callable[[Match[A
def escape(string: AnyStr) -> AnyStr: ...
def purge() -> None: ...
def template(pattern: Union[AnyStr, Pattern[AnyStr]], flags: int = ...) -> Pattern[AnyStr]: ...

View File

@@ -7,7 +7,7 @@
from typing import (
List, Iterator, overload, Callable, Tuple, Sequence, Dict,
Generic, AnyStr, Match, Pattern, Any, Optional
Generic, AnyStr, Match, Pattern, Any, Optional, Union
)
# ----- re variables and constants -----
@@ -26,6 +26,8 @@ X = 0
VERBOSE = 0
U = 0
UNICODE = 0
T = 0
TEMPLATE = 0
class error(Exception): ...
@@ -104,3 +106,4 @@ def subn(pattern: Pattern[AnyStr], repl: Callable[[Match[AnyStr]], AnyStr],
def escape(string: AnyStr) -> AnyStr: ...
def purge() -> None: ...
def template(pattern: Union[AnyStr, Pattern[AnyStr]], flags: int = ...) -> Pattern[AnyStr]: ...