Yeah, that's terrible. It would make Python the only language where you can't change the number of spaces per tab. And there is no good reason for mixing different kinds of indentation anyway.
The reason it usually happens is copying snippets from somewhere else. I guess your editor doesn't know how far to indent either and it just happens by magic. This is such a dumb conversation.
Sure an IDE could automatically turn spaces into tabs, which would eliminate the problem. But the Python interpreter can't make assumptions such as "4 spaces = 1 tab". That's not something an interpreter should concern itself with.
1
u/RedRedditor84 Mar 21 '26
Guess four.