[issue12577] Misleading shutil.move docs regarding when os.rename is used

Catalin Iacob report at bugs.python.org
Sun Jul 17 10:59:21 CEST 2011


New submission from Catalin Iacob <iacobcatalin at gmail.com>:

I recently tried to answer the question: "When moving a file to a destination that is an already existing file, is the destination overwritten?"

>From the current docs I understood that if src and dst are on the same filesystem then os.rename is used, if they are on different filesystems then copy + remove is used instead. Since os.rename fails on Windows if the destination exists I concluded that shutil.move would fail on Windows and overwrite dst on Unix.

----------
assignee: docs at python
components: Documentation
messages: 140520
nosy: catalin.iacob, docs at python
priority: normal
severity: normal
status: open
title: Misleading shutil.move docs regarding when os.rename is used
versions: Python 2.7, Python 3.2, Python 3.3

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue12577>
_______________________________________


More information about the Python-bugs-list mailing list