At 2008-12-12T15:35:11Z, "J. Cliff Dyer" <j...@sdf.lonestar.org> writes:

> Python has a version equally good:
>
> def chomp(s):
>     return s.rstrip('\r\n')
>
> You'll hardly miss Perl at all. ;)

I haven't missed Perl in years!  I just wish there was a basestring.stripeol
method because I seem to end up writing the inline version of "chomp" every
time I iterate across a file.
-- 
Kirk Strauser
The Day Companies
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to