chg: [type] Changed the way the dict in erotosthenes funtion is typed.

This commit is contained in:
Cédric Bonhomme 2023-05-21 10:26:33 +02:00
parent 3fd55e2e79
commit c12b371e7d
No known key found for this signature in database
GPG key ID: A1CB94DE57B7A70D

View file

@ -71,7 +71,7 @@ def eratosthenes() -> Iterator[int]:
"""Generate the prime numbers with the sieve of Eratosthenes. """Generate the prime numbers with the sieve of Eratosthenes.
https://oeis.org/A000040 https://oeis.org/A000040
""" """
d = {} # type: Dict[int, List[int]] d: Dict[int, List[int]] = {}
for i in itertools.count(2): for i in itertools.count(2):
if i in d: if i in d:
for j in d[i]: for j in d[i]: