shebang strange thing...

- madsurfer2000 at hotmail.com
Thu Jun 26 15:25:55 EDT 2003


bokr at oz.net (Bengt Richter) wrote in message news:<bdcl1d$v43$0 at 216.39.172.122>...
> The CR is what you get when you hit the Enter key, so Apple did the most direct thing
> in using that key code as an EOL symbol. Perhaps they thought that was "cleaner" and
> that they would lead the way to a cleaner standard way of doing things when they
> achieved market dominance ;-)
> 

I think the terminology is not taken from typewriters, but from some
old printers where you needed both characters to start a new line.

CR moved the print head to the beginning of the line and LF moved the
paper one line. It can't be compared with a typewriter, where the
[Enter] key did both operations. The Microsoft (other operating
systems also had similar EOF) way is actually the "correct" way, since
the "cursor" needs to move down one line and start at the beginning.
The Unix way is of cource more elegant, because you have a digital
computer and not some mechanical device. It doesn't matter if it's CR
or LF, because both characters only does half of the operation. Apple
should have chosen LF to preserve compatibillity.




More information about the Python-list mailing list