PEP 667: Format the flat_map example consistently (#2230)
This commit is contained in:
parent
6714cfed8a
commit
38c78b0db4
|
@ -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))
|
||||||
|
|
Loading…
Reference in New Issue