PEP 20: Fix syntax highlighting and other minor syntax/formatting issues #2432
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.
As reported by @brettcannon in #2430 , PEP 20 (PEP-0020), the Zen of Python, has some quirks under the new build system, particularly strangely-displayed syntax highlighting. This is due to the assumed default of
python
for code blocks, when they are actually just text here. As such, this PR converts the code blocks to the explicit.. code-block
syntax with language declarations, plus updates/removes a few other out of date bits of the old format in the process.Now that PEP 676 is accepted and live, I will update PEP 12 to explain this for current and future authors, and ensure the other active core/meta-PEPs also reflect it. Following that, I'll also go through and check the other old PEPs for similar issues, and fix those I find in as low-impact manner as practical (i.e. adding a
.. language
line at the top), However, we may as well just fix this now with a quick PR, since PEP 20 is a pretty "hot" and enduring PEP and the issue is pretty visible.Fix #2430