POV-Ray : Newsgroups : povray.pov4.discussion.general : Identifier declaration consistent with other languages : Re: Identifier declaration consistent with other languages Server Time
2 May 2024 18:29:42 EDT (-0400)
  Re: Identifier declaration consistent with other languages  
From: Allen
Date: 13 Nov 2008 07:35:01
Message: <web.491c1e38909e69788f162dfb0@news.povray.org>
"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

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.