Skip to content

Sync itertools-in-python3 with the updated tutorial - #853

Open
realpython-bot wants to merge 1 commit into
masterfrom
maintenance/python-itertools-20260918
Open

realpython-bot wants to merge 1 commit into
masterfrom
maintenance/python-itertools-20260918

Conversation

@realpython-bot

Copy link
Copy Markdown
Collaborator

Companion sync for the maintenance update of Python itertools By Example.

What changed

  • itertools-in-python3/README.md: the "Note" about which interpreter to invoke pointed at python3.6 / python36. The tutorial's dependencies field moved from python==3.6 (end of life since 2021-12-23) to python==3.14 in this maintenance pass, so the README now names python3.14 / python314.

sp500.py and swimmers.py needed no changes: they already match the article's updated full listings (the p <= zdp / p > zdp filterfalse() predicates that the article's inline snippets were fixed to use, double-quoted strings, and csv.DictReader rows treated as plain dictionaries). There is no requirements.txt in this folder — both scripts are standard library only — so there were no pins to move.

How it was verified

  • uv run --python 3.14 --no-project python sp500.pyMax gain: 11.58% on 2008-10-13 / Max loss: -20.47% on 1987-10-19 / Longest growth streak: 14 days (1971-03-26 to 1971-04-15), byte-for-byte the output the README and the article print.
  • uv run --python 3.14 --no-project python swimmers.py → the eight relay-team lines exactly as shown in the README and the article.
  • uvx ruff@0.14.1 format --check itertools-in-python32 files already formatted.
  • uvx ruff@0.14.1 check itertools-in-python3All checks passed!.

Links

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant