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/2006-February/061181.html below:

[Python-Dev] str object going in Py3K

[Python-Dev] str object going in Py3K [Python-Dev] str object going in Py3KGuido van Rossum guido at python.org
Fri Feb 17 05:44:43 CET 2006
On 2/16/06, M.-A. Lemburg <mal at egenix.com> wrote:
> What will be the explicit way to open a file in bytes mode
> and in text mode (I for one would like to move away from
> open() completely as well) ?
>
> Will we have a single file type with two different modes
> or two different types ?

I'm currently thinking of an I/O stack somewhat like Java's. At the
bottom there's a class that lets you do raw unbuffered reads and
writes (and seek/tell) on binary files using bytes arrays. We can
layer onto this buffering, text encoding/decoding, and more. (Windows
CRLF<->LF conversion is also an encoding of sorts).

Years ago I wrote a prototype; checkout sandbox/sio/.

--
--Guido van Rossum (home page: http://www.python.org/~guido/)
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