Changed all regular expression findall() to return list[Any]. Findall() can return both list[AnyStr] and list[Tuple[AnyStr, AnyStr]]. (#269)

This commit is contained in:
Scott G. Ainsworth
2016-06-05 20:50:12 -04:00
committed by Guido van Rossum
parent 8ee3123e02
commit 82b9baed3b
4 changed files with 8 additions and 8 deletions

View File

@@ -7,7 +7,7 @@
from typing import (
List, Iterator, overload, Callable, Tuple, Sequence, Dict,
Generic, AnyStr, Match, Pattern
Generic, AnyStr, Match, Pattern, Any
)
# ----- re variables and constants -----
@@ -52,9 +52,9 @@ def split(pattern: Pattern[AnyStr], string: AnyStr,
maxsplit: int = ..., flags: int = ...) -> List[AnyStr]: ...
@overload
def findall(pattern: AnyStr, string: AnyStr, flags: int = ...) -> List[AnyStr]: ...
def findall(pattern: AnyStr, string: AnyStr, flags: int = ...) -> List[Any]: ...
@overload
def findall(pattern: Pattern[AnyStr], string: AnyStr, flags: int = ...) -> List[AnyStr]: ...
def findall(pattern: Pattern[AnyStr], string: AnyStr, flags: int = ...) -> List[Any]: ...
# Return an iterator yielding match objects over all non-overlapping matches
# for the RE pattern in string. The string is scanned left-to-right, and