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/2007-September/074689.html below:

[Python-Dev] 'text' mode rears its ugly head again

[Python-Dev] 'text' mode rears its ugly head again [Python-Dev] 'text' mode rears its ugly head againBill Janssen janssen at parc.com
Mon Sep 17 20:08:27 CEST 2007
> > differentiation between between text files and binary files, a bad
> > idea introduced by Windows and perpetuated (apparently) by Python.  I
> > can't believe this wasn't eliminated in py3k!
> 
> The binary/text distinction is being increased in Py3k rather than 
> reduced (the API for binary files uses bytes, the API for text files 
> uses Unicode strings).

Actually, it's not so much the differentiation that bothers me, as it
is the default of assuming "text".  I think the default should be
"binary", and getting the file in "text" mode should require extra
effort.  It should be 'rt', not 'rb' -- an extra qualifier for text
mode, not for binary mode.  That would eliminate a lot of the little
bugs like this one that crop up in ports to the ineffable assemblage
that is Windows.

Bill
More information about the Python-Dev mailing list

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