Some Python 2.1 ideas
Bjorn Pettersen
pbjorn at uswest.net
Wed Dec 27 15:28:22 EST 2000
D-Man wrote:
> On Mon, Dec 25, 2000 at 12:12:41PM -0700, Bjorn Pettersen wrote:
> > I think this is a good idea by itself and should be implemented for all of
> > strip, lstrip, and rstrip, however it doesn't solve the problem we want to
> > solve with chomp (removing a line terminator, whatever the line terminator
> > happens to be).
>
> Java has a solution to this:
>
> import sys
> sys.line_terminator
Which would be wrong, since the file you're reading doesn't necessarily come
from the platform you're running on... (otherwise os.linesep would work).
-- bjorn
More information about the Python-list
mailing list