Many battles have been fought about how to indent. And finally it’s my time to beat you around the head with my opinion. Here we go.
Use goddamn tabs dammit!
Why? Because they make sense. One level of idention is one tab. If you want to ident by 4 spaces tell your editor to show a tab as 4 spaces. Your editor can’t do that? Get a better editor. Want to align stuff? Don’t do that. If you have to: You don’t.
And no spaces don’t make sense because so your code looks eactly the same everywhere. If you want that you have to ban syntax highlighting, too. Also you have to get rid of line wrapping, differing fonts, font sizes and all that stuff. Otherwise your code doesn’t look the same everywhere.
Tabs work because they are the simplest solution to the problem.
No exceptions… but there is an exception to that
There is exactly 1 (read: one - as in ‘not many’) case in which it might make sense to use spaces instead of tabs: legacy. And that is that.
Holy heck - that’s not what PEP8 says!
It’s a guideline - a pretty fine one - but still a guideline. Spaces don’t make sense anymore in my opinion. Most editors are better at dealing with tabs than dealing with spaces (auto indentation, soft tabs etc.).
One last thing
If you convert the tabs in my HTML to spaces I will haunt you.