Skip to content

Conversation

@hugovk
Copy link
Member

@hugovk hugovk commented Mar 3, 2024

  • Remove the section "For C code that needs to support versions of Python older than 2.3...". I can add it back if needed.

  • Highlight the example C code with C syntax instead of Python.

  • Like PEP 8 (PEP 8: Add green and red sidbar for good and bad examples #3567), add green and red side borders "good" and "bad" examples. For this, I split this example into two blocks:

      return albatross; /* correct */
      return(albatross); /* incorrect */
  • Format None as None, add a missing full stop. Remove some redundant PEP fields.

Example

Before After
image image

📚 Documentation preview 📚: https://pep-previews--3702.org.readthedocs.build/pep-0007/

@hugovk hugovk requested review from gvanrossum and warsaw as code owners March 3, 2024 07:53
Copy link
Contributor

@willingc willingc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lovely @hugovk

@hugovk hugovk merged commit 3cdfdd9 into python:main Mar 29, 2024
@hugovk hugovk deleted the pep7-c-syntax-hightlighting branch March 29, 2024 13:05
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.

4 participants