perl chomp equivalent in python?

Hans Nowak hnowak at
Thu Feb 10 17:25:14 EST 2000

On 10 Feb 00, at 16:31, Justin Sheehy wrote:

> > Of all newgroups, certainly comp.lang.python would be 
> > sympathetic to this issue. ;-)
> Last time I checked, Python wasn't sensitive to extra whitespace at
> the _end_ of a line.

With one exception...

print 1+ \

In this (admittedly silly) example, whitespace after the \ will cause a 
SyntaxError: invalid token. I'm curious why this hasn't been fixed yet? 
Probably a matter of "looks easy, difficult to do"?

--Hans Nowak (zephyrfalcon at
You call me a masterless man. You are wrong. I am my own master.

More information about the Python-list mailing list