A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2002-March/021098.html below:

[Python-Dev] Next version of PEP278 - universal newline support

[Python-Dev] Next version of PEP278 - universal newline support - available [Python-Dev] Next version of PEP278 - universal newline support - availableJust van Rossum just@letterror.com
Thu, 14 Mar 2002 12:09:05 +0100
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