diff --git a/maths/prime_numbers.py b/maths/prime_numbers.py index 5ad12baf3dc3..0f472b1b5b65 100644 --- a/maths/prime_numbers.py +++ b/maths/prime_numbers.py @@ -4,7 +4,7 @@ def slow_primes(max_n: int) -> Generator[int]: """ - Return a list of all primes numbers up to max. + Return a generator of all prime numbers up to max_n. >>> list(slow_primes(0)) [] >>> list(slow_primes(-1)) @@ -31,7 +31,7 @@ def slow_primes(max_n: int) -> Generator[int]: def primes(max_n: int) -> Generator[int]: """ - Return a list of all primes numbers up to max. + Return a generator of all prime numbers up to max_n. >>> list(primes(0)) [] >>> list(primes(-1)) @@ -60,7 +60,7 @@ def primes(max_n: int) -> Generator[int]: def fast_primes(max_n: int) -> Generator[int]: """ - Return a list of all primes numbers up to max. + Return a generator of all prime numbers up to max_n. >>> list(fast_primes(0)) [] >>> list(fast_primes(-1))