How does whitespace affect Python code?
Posted
by
Codereview
on Programmers
See other posts from Programmers
or by Codereview
Published on 2012-04-10T08:28:07Z
Indexed on
2012/04/10
11:41 UTC
Read the original article
Hit count: 464
python
|coding-style
I've started programming about a year ago, I've learned the C and C++ languages and bits of Java. Recently I've started to learn the Python language (Notable: I'm using the Eclipse IDE).
I'm used to formatting my code with whitespace, placing statements a bit to the right of my code for easier readability. Since I started working with Python it seems whitespace is a problem, I get some unnecessary whitespace warnings, and my code gets underlined (In eclipse).
After a while I figured Python is very restrictive about whitespace for some reason, so I've been looking for the effects of whitespace on Python code. How does it affect the code? Does the code work different with unnecessary whitespace?
© Programmers or respective owner