Fredrik Lundh wrote: > just wrote: > > > > Am I the only one who wants universal newlines *without* a new > > mode character? Ideally I'd like *existing* code that works with > > text files to accept any line ending. > > on a Unix box, does the following piece of code > open a text file or a binary data file? > > f = open(filename) If it's not a text file, that code is broken. The question is: can we afford to physically break that broken code? Probably not. That's why I've said earlier that it might be an idea to turn the universal line ending hook *off* by default on platforms where there is currently no difference between text and binary mode. (But I quite like your textfile() proposal, too.) Just
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4