Skip to content

Add python-boolean materials folder - #985

Merged
realpython-bot merged 2 commits into
masterfrom
maintenance/python-boolean-20261203
Dec 3, 2026
Merged

realpython-bot merged 2 commits into
masterfrom
maintenance/python-boolean-20261203

Conversation

@realpython-bot

Copy link
Copy Markdown
Collaborator

Adds the companion code for the tutorial Python Booleans: Use Truth Values in Your Code, which had no materials folder.

  • One script per part of the tutorial (boolean_type.py, boolean_operators.py, comparison_operators.py, boolean_testing.py, numpy_arrays.py), mirroring the code in the maintenance update draft (https://realpython.com/pbjt/blog/post/2761/change/). REPL echoes are print() calls, and expected errors are caught and printed.
  • requirements.txt pins numpy==2.5.5 for the NumPy example. The other scripts use only the standard library (Python 3.6 or later, per vermin).
  • Trello card: https://trello.com/c/bpJ8Em6H

Verification: ran every script on Python 3.14.10 and 3.15.2 with numpy==2.5.5 and compared the output with the article's REPL sessions (all match, including the NumPy 2.2+ ValueError for empty arrays). ruff@0.14.1 format --check, ruff check, and dircheck.py pass.

🤖 Generated with Claude Code

@realpython-bot
realpython-bot merged commit 2b91d60 into master Dec 3, 2026
1 check passed
@realpython-bot
realpython-bot deleted the maintenance/python-boolean-20261203 branch December 3, 2026 07:07
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