python-dev

[Prev] Thread [Next]  |  [Prev] Date [Next]

Re: [Python-Dev] Ext4 data loss Nick Coghlan Mon Mar 16 10:03:11 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   |   [EMAIL PROTECTED]   |   Brisbane, Australia
---------------------------------------------------------------
_______________________________________________
Python-Dev mailing list
[EMAIL PROTECTED]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/alexiscircle%40gmail.com