From ec323012fa12580a9121db375d940f567e0075a0 Mon Sep 17 00:00:00 2001 From: Olivia Appleton Date: Tue, 7 Jan 2025 23:47:00 -0600 Subject: [PATCH] Bug found! 3.12.8 had a breaking change to tee() behavior --- .github/workflows/python.yml | 4 ++-- python/src/p0049.py | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml index a42c106b..7cdd5cdc 100644 --- a/.github/workflows/python.yml +++ b/.github/workflows/python.yml @@ -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 @@ -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 diff --git a/python/src/p0049.py b/python/src/p0049.py index 8efdb1da..b63d2b24 100644 --- a/python/src/p0049.py +++ b/python/src/p0049.py @@ -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