IDLE gets confused when switching between tabs and spaces.
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 77.2k
- Forks
- 35.9k
- PR merge metrics
- PR metrics pending
Description
Bug report
Bug description:
My IDLE is set to the default 4-space indent. When I switch to using tabs through whatever the keyboard for toggle-tabs, after the popup message, the tab key generates the tab character.
If I switch back to using spaces using the same keyboard shortcut, I find that the tab key generates eight spaces instead of the usual four. I don’t think that’s the intended behaviour.
This is fixed after restarting IDLE.
CPython versions tested on:
3.14
Operating systems tested on:
Windows 11 & macOS
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue in IDLE by switching from four-space indentation to tabs with the toggle-tabs keyboard shortcut, then switching back on Python 3.14 under Windows 11 or macOS. Trace the toggle-tabs behavior and verify that the Tab key produces four spaces after returning to spaces without restarting IDLE.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- desktop, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100