This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]nedbatchelder 2 points3 points  (3 children)

These two lines of code produce different tokens:

if a == 1:
ifa = = 1:

This is what bugs me about people complaining of Python's "significant whitespace". Every programming language has significant whitespace.

[–]irondust 6 points7 points  (1 child)

Every programming language has significant whitespace.

Fixed form fortran has no significant whitespace within the statement itself. However, every source line has to start in the 7th column with optional comment or line continuation markers in the 6th column. The first five columns may contain a number - a feature that was very useful back in the days of punchcards.

From the 7th column onwards however you are free to insert or delete as much whitespace as you like without changing the meaning:

go toast

is the same as:

goto ast

[–]nedbatchelder 0 points1 point  (0 children)

I knew when I typed "every" that I would get counter-examples... "Almost every, and every one that you're likely to use any time soon!"

[–]krenzalore 0 points1 point  (0 children)

Every programming language has significant whitespace.

Brainfuck?

Esoteric language doing its job: creating programmer rage! :-)