Sync python-formatted-output with the updated tutorial - #838
Open
realpython-bot wants to merge 1 commit into
Open
realpython-bot wants to merge 1 commit into
realpython-bot wants to merge 1 commit into
Conversation
…o Modern Python String Formatting Tools
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Syncs
python-formatted-output/with the maintenance update of A Guide to Modern Python String Formatting Tools.What changed
format.pyAdded the new Python 3.14 grouping-after-precision example the update introduces in The
groupingComponent section, right after the thousand-separator examples:Renamed
prectoprecisionin the dynamic-format-specifier examples, so the script matches the variable name the article's code blocks use. (Pre-existing drift, picked up while syncing the folder to the article's current state.)interpolation.py(all pre-existing drift against the live article, fixed in the same pass)fandFprefixes, which is what the article's first block demonstrates; it previously repeated the quote-style contrast of the block below it."First fruit in list is"/"Last two fruits in list are"now read"... in the list ...", matching the article's output.No
requirements.txtchange: the article'sdependenciesfield ispython==3.14/minimum-python==3.6with no third-party packages, and the folder ships nothing for a reader to install from. Thepython==3.12->python==3.14bump in the article has no pin to mirror here.person.pyandREADME.mdare unchanged; nothing in the update touched them.How this was verified
uv venv --python 3.14-> CPython 3.14.6), no third-party installs needed.MPLBACKEND=Agg; all three exit 0 and their output matches the corresponding blocks in the updated draft, including the new1.234_567_89grouping output and the corrected6 bananas cost $10.44line.requirements.txtpins:uvx ruff@0.14.1 format --check python-formatted-output->3 files already formatteduvx ruff@0.14.1 check python-formatted-output->All checks passed!