|
|
"Kenneth" <kdw### [at] earthlinknet> wrote:
> "Chambers" <ben### [at] pacificwebguycom> wrote:
> > I am categorically against whitespace having meaning.
> >
>
> I tend to agree. It would, to my mind, create another level of difficulty in
> trying to track down erroneous bits if code. Not being a programmer per se
> (except with the POV SDL), I'm thinking that both the space bar and the tab
> button would create identical(?) white spaces. Of course, that may be my naive
> and uninformed notion. Please correct me if I'm wrong; I'm willing to learn!
>
> Ken W.
I'm pretty certain that Python considers a tab character in the input to be
equal to 8 space characters. It is really my only complaint with Python, in
all other ways I really enjoy Python.
With such code it is better not to mix tabs/spaces else visually you can't
really see where a block is at. Nice thing about C/C++, braces can be anywhere
and statements are terminated with a semicolon so it can span multiple lines
anywhere. Python can only span multiple lines with a line continuation or
inside of groups such as [], (), and {}
Invalid python:
list =
[
1,
2,
3
]
Valid:
list = [
1,
2,
3
]
Post a reply to this message
|
|