[Python-Dev] Ext4 data loss

Nick Coghlan ncoghlan at gmail.com
Mon Mar 16 12:46:35 CET 2009


Greg Ewing wrote:
> What might make more sense is a context manager,
> e.g.
> 
>   with renaming_file("blarg.txt", "w") as f:
>     ...

As you were describing the problems with "rename on close", I actually
immediately thought of the oft-repeated db transaction commit/rollback
example from PEP 343 :)

Cheers,
Nick.

-- 
Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia
---------------------------------------------------------------


More information about the Python-Dev mailing list