perl chomp equivalent in python?

Aahz Maruch aahz at
Thu Feb 10 23:19:55 CET 2000

In article <vndvh3w4udt.fsf at>,
Justin Sheehy  <dworkin at> wrote:
>Last time I checked, Python wasn't sensitive to extra whitespace at
>the _end_ of a line.

Untrue.  Like almost every other language with a continuation character
(usually "\"), whitespace after the continuation character causes an
error.  Granted, string.rstrip() will produce the *desired* behavior in
this case ;-), but I think it's still relevant that Python *is*
whitespace sensitive.
                      --- Aahz (Copyright 2000 by aahz at

Androgynous poly kinky vanilla queer het    <*>
Hugs and backrubs -- I break Rule 6

Nostalgia just ain't what it used to be

More information about the Python-list mailing list