[issue5129] indentation in IDLE 2.6 different from IDLE 2.5, 2.4 or vim
sy12
report at bugs.python.org
Mon Feb 2 21:11:57 CET 2009
sy12 <sy12 at club-internet.fr> added the comment:
The problem appeared in the initial display, with a file similar to bug.py.
Here is how to reproduce it:
1. open the bug.py file with IDLE 2.5 (or with Firefox from the
bugs.python.org website): the display shows the file the way the
compiler will (probably) see it;
2. open the bug.py file with IDLE 2.6: the line 7 (just after "else:")
is displayed differently.
Summary: IDLE 2.6 doesn't display the indentation that the compiler will
see.
-----------------------------------------
About the secondary problem with Untabify (discovered when trying to
solve the display problem without having to reinstall Python 2.5):
Actually, Untabify is more a solution than a problem, except maybe that
the only safe value is 8 spaces for a tabulation. Using a different
value on legacy code (old code without tests) might add subtle bugs.
According to the Python Language Reference:
"First, tabs are replaced (from left to right) by one to eight spaces
such that the total number of characters up to and including the
replacement is a multiple of eight (this is intended to be the same rule
as used by Unix)."
-----------------------------------------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue5129>
_______________________________________
More information about the Python-bugs-list
mailing list