PEP NNN: block comments in Python - #5072
Conversation
This PEP proposes a new syntax for block comments in Python using `#"""` and `##"""` delimiters. It aims to provide a consistent and efficient way to comment and uncomment code blocks, addressing the lack of native block comment syntax in Python.
Documentation build overview
8 files changed ·
|
| PEP: 1234 | ||
| Title: Block Comments for #-Based Languages While Preserving Python Standard Syntax | ||
| Author: Anonymous Python Enthusiast <email@example.com> | ||
| Sponsor: Pending |
There was a problem hiding this comment.
As you're not a core developer, you'll need a sponsor; do you have any willing sponsor?
You may be better off first posting your idea in the "Ideas" category of discuss.python.org. (Fair warning: Most ideas tend to get a negative reception.)
There was a problem hiding this comment.
Hi Jella, it's a real honor to speak with you. To be honest, I'm quite shy when it comes to talking to the community (I focus more on the technical side than on human relationships). I've been working on parsers and lexers for quite some time now (in assembler, yes, the language they considered obsolete, but it's my favorite), and I've seen other community proposals to solve the problem of Python not having block comments. (I don't mean to sound arrogant, but even though I haven't read the Python source code, I understand how it works, and I know it's better to combine existing language features than to start adding new ones.) According to benchmarks, this could very likely be the fastest and most efficient way to add block comments. I hope this clarifies things a bit for you.
There was a problem hiding this comment.
Thank you for the PEP suggestion, however a sponsor is required. Even if you can find one without a "Ideas" discussion, if we merge this draft, a discussion on discuss.python.org would still be needed before submitting the PEP to the Steering Council for decision.
So let's close this for now, and please either open an "Ideas" discussion, or find a co-author who would be willing to do these things with you.
This PEP proposes a new syntax for block comments in Python using
#"""and##"""delimiters. It aims to provide a consistent and efficient way to comment and uncomment code blocks, addressing the lack of native block comment syntax in Python.Basic requirements (all PEP Types)
pep-NNNN.rst), PR title (PEP 123: <Title of PEP>) andPEPheaderuvx pepotron next(orpipx install pepotronthenpep next)AuthororSponsor, and formally confirmed their approvalAuthor,Status(Draft),TypeandCreatedheaders filled out correctlyPEP-Delegate,Topic,RequiresandReplacesheaders completed if appropriate.github/CODEOWNERSfor the PEPStandards Track requirements
Python-Versionset to valid (pre-beta) future Python version, if relevantDiscussions-ToandPost-History