avoiding file corruption

Amir Michail amichail at gmail.com
Sun Aug 27 10:51:18 EDT 2006


Grant Edwards wrote:
> On 2006-08-27, Amir  Michail <amichail at gmail.com> wrote:
>
> > Trying to open a file for writing that is already open for writing
> > should result in an exception.
>
> MS Windows seems to do something similar, and it pisses me off
> no end.  Trying to open a file and read it while somebody else
> has it open for writing causes an exception.  If I want to open
> a file and read it while it's being writtent to, that's my
> business.
>
> Likewise, if I want to have a file open for writing twice,
> that's my business as well.  I certainly don't want to be
> hobbled to prevent me from wandering off in the wrong direction.
>
> > It's all too easy to accidentally open a shelve for writing
> > twice and this can lead to hard to track down database
> > corruption errors.
>
> It's all to easy to delete the wrong element from a list.  It's
> all to easy to re-bind the wrong object to a name.  Should
> lists be immutable and names be permanently bound?
>

How often do you need to open a file multiple times for writing?

As a high-level language, Python should prevent people from corrupting
data as much as possible.

Amir

> --
> Grant Edwards                   grante             Yow!  I'm in a twist
>                                   at               contest!! I'm in a
>                                visi.com            bathtub! It's on Mars!! I'm
>                                                    in tip-top condition!




More information about the Python-list mailing list