Hacker News new | past | comments | ask | show | jobs | submit login

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




If 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 :)


YMMV 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.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: