

chewanter wrote:Okay.
What's with the whitespace indicating syntax? I mean, really?

Itachihro wrote:chewanter wrote:Okay.
What's with the whitespace indicating syntax? I mean, really?
Theres not really anything set, the only thing that matters is that code blocks (for example following a function definition) must be indented, and all parts of the same code block must have the same indention. Vertical whitespace doesn't matter, also it doesn't make a difference if you indent by 1, 4 or 4000 spaces (Standard is 4 spaces, but the interpreter doesn't really care. 4 Spaces just happen to be the number of spaces that looks best). It's strongly suggested NOT to use tabs, because they might be (scratch that- will very likely be) misinterpreted (though many python editors offer automatic conversion of tabs into spaces).


Itachihro wrote:You sure? I try to keep my brackets with the same indention aswell if they are on multiple lines, but i've never tested wether it would work or not if i didn't indent them.


Itachihro wrote:enforced structuring of code is IMO a good thing though.


Users browsing this forum: No registered users and 1 guest