[issue41184] Reconciling IDLE's Comment Out Region / Uncomment Region with PEP 8 guidelines for commenting

2020-07-01 Thread Guido van Rossum


Guido van Rossum  added the comment:

The IDLE feature should not change, for all the reasons Terry have.

I am quite done with changes to PEP in order to settle arguments, and I do not 
believe this convention needs mentioning in that PEP. Remember there is text in 
PEP 8 reminding readers to use your best judgment.

--
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41184] Reconciling IDLE's Comment Out Region / Uncomment Region with PEP 8 guidelines for commenting

2020-07-01 Thread Terry J. Reedy


[issue41184] Reconciling IDLE's Comment Out Region / Uncomment Region with PEP 8 guidelines for commenting

2020-07-01 Thread Anthropologist


New submission from Anthropologist :

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.

--
assignee: docs@python
components: Documentation, IDLE
messages: 372757
nosy: anthropologist, docs@python, terry.reedy
priority: normal
severity: normal
status: open
title: Reconciling IDLE's Comment Out Region / Uncomment Region with PEP 8 
guidelines for commenting
type: behavior
versions: Python 3.8

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com