[issue16887] IDLE - tabify/untabify applied when clicking Cancel

Roger Serwy report at bugs.python.org
Tue Apr 2 06:31:28 CEST 2013


Roger Serwy added the comment:

Todd,

Tabify/Untabify are functions to deal with the great tabs vs. spaces debate (though PEP8 says that spaces are the way to go). 

The tabify function needs a minimum of 2 spaces before it replaces it with a tab.

Its implementation in Lib/idlelib/EditorWindow.py under the tabify_region_event and untabify_region_event reveals a curiousity in its implementation. Tabify will replace spans of space characters with tabs, but still leave in extra space characters if needed. Untabify simply expands all tabs to a fixed number of spaces.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue16887>
_______________________________________


More information about the Python-bugs-list mailing list