Message107856
Sorry to be nitpicky, but:
(a) the line[-2] produces "IndexError: string index out of range" on empty
lines, and
(b) this won't detect trailing whitespace on the last line of a file, if there's no newline at the end of the file. Actually, it might also be worth checking that there *is* a newline at the end of the file; this is actually required by the C standards. (E.g., C99 5.1.1.2p2: "A source file that is not empty shall end in a new-line character".) |
|
Date |
User |
Action |
Args |
2010-06-15 09:16:57 | mark.dickinson | set | recipients:
+ mark.dickinson, brett.cannon, belopolsky, pitrou, eric.araujo |
2010-06-15 09:16:56 | mark.dickinson | set | messageid: <1276593416.95.0.238814989986.issue8912@psf.upfronthosting.co.za> |
2010-06-15 09:16:55 | mark.dickinson | link | issue8912 messages |
2010-06-15 09:16:54 | mark.dickinson | create | |
|