4 ms·
Python 3 won't compile with mixed indentation so by recommending a mixture you're picking a fight you cannot win and still have python programmers along with yo
by eterm 7y ago
Python 3 won't compile with mixed indentation so by recommending a mixture you're picking a fight you cannot win and still have python programmers along with you.
- JackC 7y agoSeems like it will to me. Here's an example using tabs for indent and spaces for alignment: https://repl.it/repls/SubduedLegalDisk https://repl.it/repls/SubduedLegalDisk
- eterm 7y agoI can't follow that link but I'll trust you, I was just going off what the documentation had to say: https://www.python.org/dev/peps/pep-0008/#tabs-or-spaces https://www.python.org/dev/peps/pep-0008/#tabs-or-spaces My reading of "Disallow" must be wrong.
- dkersten 7y agoAs long as you always “indent” with tabs and only use spaces after, you’re good, I believe. That is, if you want to align something, you just first indent to the level of the previous line with tabs and then you can use spaces for alignment within that indentation level. What you can’t do is, for example, have a space and then a tab.