perl chomp equivalent in python?

Will Ware wware at world.std.com
Thu Feb 10 10:27:21 EST 2000


Alex (alex at somewhere.round.here) wrote:

: > It'd be kinda cool if readlines() could take an argument that meant to
: > strip away any trailing whitespace.

: Below are some classes I often use for that sort of thing.

Thanks! Those are very pretty, particularly the use of __getitem__. I
haven't yet managed to train myself to exploit that idiom well. Maybe
Basic as a first programming language really does break your brain.
-- 
-- I can picture in my mind a world without war, a world without hate. And --
-- I can picture us attacking that world, because they'd never expect it.  --
Will Ware - N1IBT - wware at world.std.com



More information about the Python-list mailing list