[Python-Dev] wait time [was: Ext4 data loss]

Antoine Pitrou solipsis at pitrou.net
Thu Mar 12 21:25:59 CET 2009


R. David Murray <rdmurray <at> bitdance.com> writes:
> 
> By the way, I would not like to see python programmers encouraged to make
> the same mistake that sqlite3 made.  The decision about how aggressive
> to be on flushing data to disk should be in the hands of the _user_, not
> the application.

I disagree. The user usually does not know which kind of flushing is needed in
order for his data to be safe. Actually, he probably doesn't even know what
flushing means, and that files are ever "closed".

However, I also think that any parameter to flush() or close() is a bad idea,
since it can't be used when flushing and closing is implicit. For example when
the file is used in a "with" statement.




More information about the Python-Dev mailing list