Author anthropologist
Recipients anthropologist, docs@python, terry.reedy
Date 2020-07-01.15:24:13
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1593617055.59.0.538237347639.issue41184@roundup.psfhosted.org>
In-reply-to
Content
IDLE's Comment Out Region formatting tool currently adds two octothorpe characters followed by no spaces.  The Uncomment Region tool removes up to 2 octothorpes but does not remove spaces. 

The Python Style Guide (PEP 8) specifies that: "An inline comment is a comment on the same line as a statement. Inline comments should be separated by at least two spaces from the statement. They should start with a # and a single space."

I propose reconciling these conflicting approaches to commenting out code, either by changing IDLE's behavior (i.e., instead of ##, Comment Out Region should insert # followed by a space, per PEP 8), or by amending the Python Style Guide to provide clear instructions about commenting out code, which is arguably a different use of comments than a single-line comment for the sake of explaining code. 

If the resolution involves changing IDLE's behavior, the Uncomment Region feature should also be changed to remove the space character after the octothorpe. As it currently stands, this feature fails to uncomment code that has been manually commented out following the guidelines in PEP 8.
History
Date User Action Args
2020-07-01 15:24:15anthropologistsetrecipients: + anthropologist, terry.reedy, docs@python
2020-07-01 15:24:15anthropologistsetmessageid: <1593617055.59.0.538237347639.issue41184@roundup.psfhosted.org>
2020-07-01 15:24:15anthropologistlinkissue41184 messages
2020-07-01 15:24:14anthropologistcreate