Skip to content

Sample code for: Python 3.15: Cool New Features for You to Try - #862

Open
bzaczynski wants to merge 1 commit into
masterfrom
python315-new-features
Open

bzaczynski wants to merge 1 commit into
masterfrom
python315-new-features

Conversation

@bzaczynski

Copy link
Copy Markdown
Contributor

Where to put new files:

  • New files should go into a top-level subfolder, named after the article slug. For example: my-awesome-article

How to merge your changes:

  1. Make sure the CI code style tests all pass (+ run the automatic code formatter if necessary).
  2. Find an RP Team member on Slack and ask them to review & approve your PR.
  3. Once the PR has one positive ("approved") review, GitHub lets you merge the PR.
  4. 🎉

Code examples for the Python 3.15: Cool New Features for You to Try tutorial. Files live in the python315-new-features/ top-level folder, named after the article slug.

  • lazy_json.py, typeform_check.py, typeddict.py, ctxmgr.py, python315_in_15_lines.py: extracted verbatim from the tutorial
  • wordstats.py, menu.txt: files the tutorial references as part of the downloadable materials (profiler and UTF-8 sections)
  • requirements.txt: pins pyright==1.1.414, used for the static typing examples

Ruff exclusion: pyproject.toml now excludes python315-new-features, like python315-lazy-imports and python315-frozendict, because the pinned ruff 0.14.1 can't parse the new lazy import syntax. The scripts are also kept unformatted on purpose, so Pyright's reported line numbers match the ones shown in the tutorial.

Verified on Python 3.15.0rc2 (and 3.14 for ctxmgr.py). Output matches the tutorial, including Pyright 1.1.414 diagnostics and the Tachyon profiler rows for wordstats.py.

Generated from the tutorial markdown with the post-materials skill, then verified locally before pushing.

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

This branch has not been deployed

No deployments
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