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/2009-September/092132.html below:

[Python-Dev] IO module precisions and exception hierarchy

[Python-Dev] IO module precisions and exception hierarchy [Python-Dev] IO module precisions and exception hierarchyGreg Ewing greg.ewing at canterbury.ac.nz
Sun Sep 27 13:16:38 CEST 2009
Pascal Chambon wrote:

> -> it seems that the only important matter is : file pointer positions 
> and bytes/characters read should always be the ones that the user 
> expects, as if there were no buffering.

That sounds right to me.

> Q from me : What happens in read/write text files, when overwriting a 
> three-bytes character with a single-byte character ?

I think you deserve whatever you get. If you want to be able
to overwrite things that accurately, you should be dealing
with the stream at the byte level.

> Here is a very rough beginning of IOError hierarchy.

>  +-InvalidFileNameError (filepath max lengths, or "? / : " characters in 
> a windows file name...)

This might be a bit too precise. Unix just has EINVAL, which
covers any kind of invalid parameter, not just file names.

-- 
Greg

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