New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
indentation in IDLE 2.6 different from IDLE 2.5, 2.4 or vim #49379
Comments
platform: Windows XP In a file (cf attached file) with mixed tabs and spaces, the line |
IDLE's "untabify" feature (required by IDLE 2.6 when running from IDLE) Maybe IDLE 2.6 is assuming by default that a tab is 4 spaces? |
I don't see a problem with Untabify. IDLE cannot know how big you In most cases, the default is pretty good -- it attempts to infer the 'if:\n pass\nif:\n\tpass\n' --> guesses a two space indent What differences are you seeing between 2.5 and 2.6? Is it the initial |
The problem appeared in the initial display, with a file similar to bug.py. Here is how to reproduce it:
Summary: IDLE 2.6 doesn't display the indentation that the compiler will ----------------------------------------- Actually, Untabify is more a solution than a problem, except maybe that According to the Python Language Reference: |
I just tried it here under Windows XP (using python 2.6.1 from Also, from what I remember, IDLE always assume that a tab takes 8 As for the real problem mentioned -- the differences in the visual, |
It turns out that the problem is not in differences between IDLE in 2.5 |
You do not need IDLE to reproduce the problem: import Tkinter
text = Tkinter.Text()
text.pack()
text.insert('1.0',
'class C:\n\tdef m(self, c):\n '
'if c:\n c = False\n'
'\t\t\tc = False\n else:\n '
'\t\tc = True\n\t\tc = True\n')
text.mainloop() Then run it with tk 8.4 and tk 8.5. |
Patch attached, if someone can create a test for it then that would be |
r70723. Thanks for the patch! |
Backported to release26-maint: r71911 |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: