3 ms·
You need to use spaces for alignment, so indenting with tabs and aligning stuff (in the way suggested by PEP8[0]) is impossible without mixing tabs and spaces.
by nemetroid 13y ago
You need to use spaces for alignment, so indenting with tabs and aligning stuff (in the way suggested by PEP8[0]) is impossible without mixing tabs and spaces.
[0]: http://www.python.org/dev/peps/pep-0008/#maximum-line-length http://www.python.org/dev/peps/pep-0008/#maximum-line-length
- berdario 13y agoIf you read carefully, you'll see that you don't actually _need_ to align, you can always indent it further In fact, I always found space-alignment cumbersome and sometimes ugly... always indenting with tabs was thus perfectly consistent But that's the past, now :)
- ekimekim 13y agoYMMV but I always felt the spirit of that rule was "Don't mix tabs and spaces for indenting (ie. where it matters to the interpreter)". Indeed, a quick test with python -tt shows that the tab-indent/space-align method does not throw an error, while using tabs and spaces to indent does.