[issue1112955] move_file()'s return value when dry_run=1 unclear
Daniel Diniz
report at bugs.python.org
Tue Feb 10 00:57:49 CET 2009
Daniel Diniz <ajaksu at gmail.com> added the comment:
Here's a very simple-minded patch (with microtest) that changes behavior
in a questionable way.
If it goes in as-is, dry_run=1 will not always succeed anymore. So it'd
be incompatible... but a 1:1 representation of a real move kinda
requires some failure mode.
It's possible to avoid raising when dry_run=1, logging a warning that a
real move would fail, and return the imaginary new full name. Or return
None, '', etc. Suggestions?
Perhaps studying a use-case makes things clearer.
Looks like copy_file already has the same return value independent of
dry_run.
----------
keywords: +patch
Added file: http://bugs.python.org/file12999/move_file_dry_run.diff
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue1112955>
_______________________________________
More information about the Python-bugs-list
mailing list