4 ms·
Python, which this program is written in, uses indentation for blocks. Mixing spaces and tabs is basically a syntax error.
by kbanana 7y ago
Python, which this program is written in, uses indentation for blocks. Mixing spaces and tabs is basically a syntax error.
- giancarlostoro 7y agoWhich 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.
- joepie91_ 7y agoThat'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.
- saagarjha 7y agoRight, but this doesn't mean that the author can't use tabs to indent their code.