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

Python, which this program is written in, uses indentation for blocks. Mixing spaces and tabs is basically a syntax error.



Which is why PEP-8 the Python code style guide enforces 4 spaces. This maintains consistency throughout the community. Also PyCharm one of the more popular IDEs for Python uses 4 spaces by default.


That's not what PEP-8 is for, it was meant to define the style of the standard libraries. A lot of people in the community voluntarily adopted it for their projects, but that wasn't its purpose.


Right, but this doesn't mean that the author can't use tabs to indent their code.




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

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

Search: