Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sequence -> iterable in tutorial #8067

Merged
merged 1 commit into from
Oct 19, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions docs/tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import os


def sum_even_numbers(numbers: Iterable[int]) -> int:
"""Given a sequence of integers, return the sum of all even numbers in the sequence."""
"""Given an iterable of integers, return the sum of all even numbers in the iterable."""
return sum(num for num in numbers if num % 2 == 0)
```

Expand Down Expand Up @@ -61,7 +61,7 @@ Running `git diff` shows the following:
-

def sum_even_numbers(numbers: Iterable[int]) -> int:
"""Given a sequence of integers, return the sum of all even numbers in the sequence."""
"""Given an iterable of integers, return the sum of all even numbers in the iterable."""
return sum(num for num in numbers if num % 2 == 0)
```

Expand Down Expand Up @@ -184,7 +184,7 @@ from typing import Iterable # noqa: UP035


def sum_even_numbers(numbers: Iterable[int]) -> int:
"""Given a sequence of integers, return the sum of all even numbers in the sequence."""
"""Given an iterable of integers, return the sum of all even numbers in the iterable."""
return sum(num for num in numbers if num % 2 == 0)
```

Expand All @@ -206,7 +206,7 @@ from typing import Iterable


def sum_even_numbers(numbers: Iterable[int]) -> int:
"""Given a sequence of integers, return the sum of all even numbers in the sequence."""
"""Given an iterable of integers, return the sum of all even numbers in the iterable."""
return sum(num for num in numbers if num % 2 == 0)
```

Expand Down
Loading