We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 31d63a1 commit 5ea6331Copy full SHA for 5ea6331
ciphers/sha256.py
@@ -19,6 +19,7 @@
19
"""
20
21
import math
22
+from collections.abc import Iterator
23
from itertools import count, islice
24
25
# =============================================================================
@@ -232,7 +233,7 @@ def is_prime(num_to_test: int) -> bool:
232
233
return all(num_to_test % f != 0 for f in range(2, math.isqrt(num_to_test) + 1))
234
235
-def first_n_primes(count_primes: int) -> list[int]:
236
+def first_n_primes(count_primes: int) -> Iterator[int]:
237
238
Generates the first n prime numbers using itertools.count and a primality test.
239
Examples:
0 commit comments