Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 071be77

Browse filesBrowse files
authored
[re] Improve comment about using Any for findall() (#16074)
1 parent a057272 commit 071be77
Copy full SHA for 071be77

1 file changed

+2-1Lines changed: 2 additions & 1 deletion

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎stdlib/re.pyi‎

Copy file name to clipboardExpand all lines: stdlib/re.pyi
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ class Pattern(Generic[AnyStr]):
169169
@overload
170170
def split(self, string: AnyStr, maxsplit: int = 0) -> list[AnyStr | MaybeNone]: ...
171171

172-
# return type depends on the number of groups in the pattern
172+
# return type is either list[str/bytes] or list[tuple[str/bytes, ...]]
173173
@overload
174174
def findall(self: Pattern[str], string: str, pos: int = 0, endpos: int = sys.maxsize) -> list[Any]: ...
175175
@overload
@@ -302,6 +302,7 @@ def split(
302302
pattern: bytes | Pattern[bytes], string: ReadableBuffer, maxsplit: int = 0, flags: _FlagsType = 0
303303
) -> list[bytes | MaybeNone]: ...
304304

305+
# return type is either list[str/bytes] or list[tuple[str/bytes, ...]]
305306
@overload
306307
def findall(pattern: str | Pattern[str], string: str, flags: _FlagsType = 0) -> list[Any]: ...
307308
@overload

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.