2 ms·
python... tabs == devil in python.
by gte910h 17y ago
python... tabs == devil in python.
- nailer 17y agoYou're being modded down as that's not a complete sentence, but yes, since there's a standard (PEP 8) stating that spaces are preferable to tabs, and that indentation should be 4 characters, and all modules I've seen use that standard, tabs are indeed looked upon as being bad in Python.
- gte910h 17y agoIt's not just that. The REASON why tabs are so bad is because it makes very very subtle errors when they get mixed. Additionally, tabs are 8 spaces to the python interpreter. If you're not using 8 space tab stop, you're setting up people who use your code for a world of hurt if they ever change anything in your files.
- jvdh 17y agotabs and spaces are different things to the Python interpreter. If you really want to, you can mix them in your code. But you cannot mix tabs and spaces on the same indent level.
- camccann 17y agoThe REASON why tabs are so bad is because it makes very very subtle errors when they get mixed. And the reason why spaces are bad is because it makes subtle errors when they get mixed in with tab-indented code. This is an argument for consistency, not for using spaces.