perl chomp equivalent in python?

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


In article <vndvh3w4udt.fsf at camelot-new.ccs.neu.edu>,
Justin Sheehy  <dworkin at ccs.neu.edu> 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 netcom.com)

Androgynous poly kinky vanilla queer het    <*>     http://www.rahul.net/aahz/
Hugs and backrubs -- I break Rule 6

Nostalgia just ain't what it used to be



More information about the Python-list mailing list