From c26b61afd7430da6cbf41fc228a1473241f10805 Mon Sep 17 00:00:00 2001 From: Anuj Chauhan <23f2000188@ds.study.iitm.ac.in> Date: Sat, 21 Feb 2026 22:27:11 +0530 Subject: [PATCH 1/2] fix: correct docstrings in prime_numbers.py The docstrings for slow_primes(), primes(), and fast_primes() incorrectly stated 'Return a list of all primes numbers up to max.' However, all three functions return a Generator[int], not a list. Also fixed the grammar: 'primes numbers' -> 'prime numbers'. --- maths/prime_numbers.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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)) From fab473af7f2fe1d0d4c0dda6997327922322ec14 Mon Sep 17 00:00:00 2001 From: Anuj Chauhan <23f2000188@ds.study.iitm.ac.in> Date: Sat, 21 Feb 2026 22:27:29 +0530 Subject: [PATCH 2/2] fix: correct docstrings in prime_numbers.py The docstrings for slow_primes(), primes(), and fast_primes() incorrectly stated 'Return a list of all primes numbers up to max.' However, all three functions return a Generator[int], not a list. Also fixed the grammar: 'primes numbers' -> 'prime numbers'.