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 David.Benjamin
Recipients David.Benjamin, docs@python
Date 2012-10-18.17:36:15
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1350581776.08.0.668682100781.issue16278@psf.upfronthosting.co.za>
In-reply-to
Content
This is somewhat of a nitpick. os.rename's documentation says "If dst is a directory, OSError will be raised". On Unix, this isn't completely true. If the source is a directory and the destination is an empty directory, it'll overwrite the former with the latter. (Actually if the source is a directory the inverse is true; if dst is a file, OSError will be raised.)

In [1]: import os

In [2]: os.mkdir("aaa")

In [3]: open("aaa/blah", "w").close()

In [4]: os.mkdir("bbb")

In [5]: os.rename("aaa", "bbb")

In [6]: os.listdir("bbb")
Out[6]: ['blah']
History
Date User Action Args
2012-10-18 17:36:16David.Benjaminsetrecipients: + David.Benjamin, docs@python
2012-10-18 17:36:16David.Benjaminsetmessageid: <1350581776.08.0.668682100781.issue16278@psf.upfronthosting.co.za>
2012-10-18 17:36:16David.Benjaminlinkissue16278 messages
2012-10-18 17:36:15David.Benjamincreate