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.

classification
Title: Possible Error in "Brief Tour of the Standard Library"
Type: enhancement Stage:
Components: Documentation Versions: Python 3.3
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: rhettinger Nosy List: Pitmaster, docs@python, python-dev, r.david.murray, rhettinger
Priority: normal Keywords: patch

Created on 2014-05-22 17:39 by Pitmaster, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
stdlib.patch David.Harrigan, 2014-05-22 20:19 review
Messages (4)
msg218904 - (view) Author: Erik Kusko (Pitmaster) Date: 2014-05-22 17:39
In https://docs.python.org/3/tutorial/stdlib.html, there is an example:

>>> import shutil
>>> shutil.copyfile('data.db', 'archive.db')
>>> shutil.move('/build/executables', 'installdir')

Should it not be:

>>> import shutil
>>> shutil.copyfile('data.db', 'archive.db')
'archive.db'
>>> shutil.move('/build/executables', 'installdir')
'installdir'

?  I am run under Windows, so I don't know if the behavior is different than under Linux.  Under Windows the destination file and destination directory, respectively, are echoed to stdout.
msg218906 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2014-05-22 17:43
Yes, this is a recent enhancement and the example was not updated to match.
msg218925 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2014-05-22 22:38
New changeset e07e347688a0 by Raymond Hettinger in branch '3.4':
Issue 21554:  Repair an out-of-date tutorial example to reflect changes in shutil.
http://hg.python.org/cpython/rev/e07e347688a0
msg218926 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2014-05-22 22:38
Fixed.

Thanks for the clear bug report.
History
Date User Action Args
2022-04-11 14:58:03adminsetgithub: 65753
2014-05-22 22:38:54rhettingersetstatus: open -> closed
resolution: fixed
messages: + msg218926
2014-05-22 22:38:05python-devsetnosy: + python-dev
messages: + msg218925
2014-05-22 22:27:58rhettingersetassignee: docs@python -> rhettinger

nosy: + rhettinger
2014-05-22 20:19:41David.Harrigansetfiles: + stdlib.patch
keywords: + patch
2014-05-22 17:43:24r.david.murraysetnosy: + r.david.murray
messages: + msg218906
2014-05-22 17:39:05Pitmastercreate