This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author tarek
Recipients eric.smith, meatballhat, olemis, pitrou, tarek
Date 2010-05-03.17:42:31
SpamBayes Score 0.0007698849
Marked as misclassified No
Message-id <1272908552.9.0.396600831561.issue8604@psf.upfronthosting.co.za>
In-reply-to
Content
This idiom makes sense when you want to do some things with an open file, and replaces the usual try..finally idiom.

That's not what we want to do here. We want to write data in a file in a single step, in an atomic manner. 

Giving the ability to the developers to work in a context manager means that you potentially give them the ability to break this atomicity.

So I don't think the context manager idiom prevails, and should be avoided : shutil.atomic_write is asked to write a file, given some data, and don't return until it's done.
History
Date User Action Args
2010-05-03 17:42:32tareksetrecipients: + tarek, pitrou, eric.smith, olemis, meatballhat
2010-05-03 17:42:32tareksetmessageid: <1272908552.9.0.396600831561.issue8604@psf.upfronthosting.co.za>
2010-05-03 17:42:31tareklinkissue8604 messages
2010-05-03 17:42:31tarekcreate