[Idle-dev] IDLE comments

Tal Einat taleinat at gmail.com
Sat Jun 20 11:33:50 CEST 2009

Jason Gervich wrote:
> Why does IDLE use two hash marks for comments (##)? Most other editors
> (Geany, SPE) use a single hash mark (#) to designate comments.

I actually don't know. I find that it's rather useful since I usually
use the commenting function to comment out blocks of code, and having
these commented with "##" differentiates them from comments which I
write manually.

> How does one change IDLE to use just a single (#) hash mark for comments?

Take a look at EditorWindow.comment_region_event in
idlelib/EditorWindow.py. The "##" is hard-coded; just changing it to
"#" should work (not tested).

- Tal Einat

More information about the IDLE-dev mailing list