On 24 January 2012 08:59, Tim Gruene <t...@shelx.uni-ac.gwdg.de> wrote:

> [flame=;-)]
> P.S.: don't use python. It's a nightmare language, sloppy, it forces you
> to format the code in a specific way rather than your own way and ...
> [/flame]

I'm inclined to go along with you there: the main reason I've put off
learning Python is that it uses spacing characters (space, tab and
newline) as an integral part of the syntax and I've always felt
uncomfortable with that (memories of fixed format code and data I
suppose!).  Somehow a semicolon at the end of the line has a
reassuring air of finality!  Maybe a Python expert will answer this
but I've often wondered, what happens if as some editors do
(particularly if as I do you have to use different editors at
different times depending on where you are working, such as on Windows
working remotely from home or Linux at work), you could have a mixture
of space and tab characters in the file?  Often you don't know what
space/tab characters the editor is putting in and you shouldn't have
to know: the principle should be that if it looks right in the editor
then it is right.  So does Python automatically expand the tabs to the
equivalent number of spaces or (as in data input) are they treated as
single characters?  And anyway how does Python know what tab stops my
editors are set to and indeed how exactly my editors treat tabs?  The
appearance of the file doesn't tell you what's going on, e.g. N spaces
followed by a tab looks exactly the same as just a tab if N <8.  I
would hope that the answer is that I don't need to worry about any of
this!

Cheers

-- Ian

Reply via email to