Skip to content

Commit

Permalink
Bug found! 3.12.8 had a breaking change to tee() behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
LivInTheLookingGlass committed Jan 8, 2025
1 parent 0e1e1b3 commit ec32301
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
strategy:
fail-fast: false
matrix:
version: ["3.6", "3.7", "3.8", "3.9", "3.10", "3.11", "3.12.7"]
version: ["3.6", "3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
os: [ubuntu-latest, windows-latest]
exclude:
- os: ubuntu-latest
Expand All @@ -31,7 +31,7 @@ jobs:
- os: macos-latest
version: 3.11
- os: macos-latest
version: 3.12.7
version: 3.12
- os: ubuntu-latest
version: graalpy-23.1
- os: macos-13
Expand Down
6 changes: 3 additions & 3 deletions python/src/p0049.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@
def main() -> int:
primes_at_1000 = primes(10000)
consume(takewhile((1000).__gt__, primes_at_1000))
primes_at_1000, pgen_1 = tee(primes_at_1000)
_, pgen_1 = tee(primes_at_1000)
for p1 in pgen_1:
if p1 == 1487:
continue
pgen_1, pgen_2 = tee(pgen_1)
_, pgen_2 = tee(pgen_1)
for p2 in pgen_2:
if p2 > 10000 - p1 // 2:
break
pgen_2, pgen_3 = tee(pgen_2)
_, pgen_3 = tee(pgen_2)
for p3 in pgen_3:
dp1p2 = p1 - p2
dp2p3 = p2 - p3
Expand Down

0 comments on commit ec32301

Please sign in to comment.