Skip to content

Add python-min-and-max materials folder - #968

Merged
realpython-bot merged 2 commits into
masterfrom
maintenance/python-min-and-max-20261201
Dec 1, 2026
Merged

realpython-bot merged 2 commits into
masterfrom
maintenance/python-min-and-max-20261201

Conversation

@realpython-bot

Copy link
Copy Markdown
Collaborator

Adds the code examples for Python's min() and max(): Find Smallest and Largest Values. The tutorial didn't have a materials folder yet.

  • One script per tutorial section, plus person.py and min_max.py as shown in the article. REPL echoes become print() / repr() calls, and examples that raise on purpose catch the exception and print its message.
  • min_max.py is the article's complete source (min_max(), custom_min(), custom_max()) with a short __main__ demo.
  • Standard library only, so there's nothing to install.

Verified: every script ran on CPython 3.13 (the article's tested version), and each one's output matches the article (except the machine-dependent timeit timings). ruff@0.14.1 format --check, ruff check, and dircheck.py all pass. vermin reports a 3.8 minimum (math.dist()).

This is part of the maintenance update of the article (draft: https://realpython.com/pbjt/blog/post/2615/change/, card: https://trello.com/c/P6vvCV7x). The article's python-min-and-max-code opt-in points at this folder, so this PR needs to merge before the update goes live.

🤖 Generated with Claude Code

@realpython-bot
realpython-bot merged commit 32bc479 into master Dec 1, 2026
1 check passed
@realpython-bot
realpython-bot deleted the maintenance/python-min-and-max-20261201 branch December 1, 2026 13:19
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