indentation

Tim Peters tim_one at email.msn.com
Sat Dec 4 17:12:19 EST 1999


[Will Rose]
> I always assumed that Python's whitespace rules _came_ from Fortran IV:
> or at least something overly intimate with 80-col punched cards.

Python's use of whitespace is the polar opposite of Fortran Classic's:
whitespace means nothing in the latter, not even as a token separator.

      DO 5 INDEX = 1, 20

is the same as

      DO5INDEX=1,20

is the same as

           D     O5IND     EX =1,2     0

None of them mean what

     DO 5 INDEX = 1, 20

means, though, because the leading "D" in the last one is in column 6.
Python's rules have nothing in common with any of that.

whitespace-ignored-vs-whitespace-required-ly y'rs  - tim






More information about the Python-list mailing list