PEP 667: Format the flat_map example consistently (#2230)

This commit is contained in:
Steven Troxler 2022-01-12 11:20:28 -08:00 committed by GitHub
parent 6714cfed8a
commit 38c78b0db4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -107,7 +107,10 @@ type checkers to find the bug.
With our proposal, the example looks like this:: With our proposal, the example looks like this::
def flat_map(l: list[int], func: (int) -> list[int]) -> list[int]: def flat_map(
l: list[int],
func: (int) -> list[int],
) -> list[int]:
out = [] out = []
for element in l: for element in l:
out.extend(f(element)) out.extend(f(element))