Sybren Stuvel wrote: > Fuzzyman enlightened us with: > > My worry is that if '\n' *doesn't* signify a line break on the Mac, > > then it may exist in the body of the text - and trigger ``ending = > > '\n'`` prematurely ? > > I'd count the number of occurences of '\r\n', '\n' without a preceding > '\r' and '\r' without following '\n', and let the majority decide. >
Sounds reasonable, edge cases for small files be damned. :-) Fuzzyman http://www.voidspace.org.uk/python/index.shtml > Sybren > -- > The problem with the world is stupidity. Not saying there should be a > capital punishment for stupidity, but why don't we just take the > safety labels off of everything and let the problem solve itself? > Frank Zappa -- http://mail.python.org/mailman/listinfo/python-list