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 techtonik
Recipients Trundle, draghuram, eric.araujo, giampaolo.rodola, neologix, pitrou, r.david.murray, tarek, techtonik, vstinner
Date 2011-12-23.19:51:10
SpamBayes Score 4.989997e-10
Marked as misclassified No
Message-id <CAPkN8xJ2hPmnrMg9VRKVfBBjN2yDZGrF27XMF-DLUNvLopnCug@mail.gmail.com>
In-reply-to <1324668907.3388.54.camel@localhost.localdomain>
Content
On Fri, Dec 23, 2011 at 10:35 PM, Antoine Pitrou <report@bugs.python.org>wrote:

> > os.rename(overwrite=False) by default will do less harm than the
> opposite,
>
> Disagreed.
>

Fine. No arguments == no consensus.

> > Then I believe that having a small chance of overwriting file just
> created
> > at exactly the same moment on a POSIX is a small price to pay for
> function
> > that does safety check before rename on a platform that doesn't have such
> > functionality at all.
>
> Disagreed.
> If you need the functionality, it's *one* additional line of code. Not
> every trivial function deserves to be in the stdlib.

As a Windows programmer I am quite surprised to read this thread with
information that on Linux os.rename() overwrites files without questions,
so as I Windows programmer I want os.rename() to stop that. I always guard
my code against accidental rewrite by catching the exception. EAFP and all
that stuff. But there is no way I can ask forgiveness when files are
already overwritten.
History
Date User Action Args
2011-12-23 19:51:11techtoniksetrecipients: + techtonik, pitrou, vstinner, draghuram, giampaolo.rodola, tarek, eric.araujo, r.david.murray, Trundle, neologix
2011-12-23 19:51:11techtoniklinkissue8828 messages
2011-12-23 19:51:10techtonikcreate