classification
Title: Place the term "delete" within the documentation for os.remove() and os.rmdir()
Type: Stage:
Components: Documentation Versions: Python 3.1, Python 2.6
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: georg.brandl Nosy List: georg.brandl, mcow, terry.reedy
Priority: normal Keywords:

Created on 2009-08-10 17:09 by mcow, last changed 2009-08-24 18:04 by mcow. This issue is now closed.

Messages (6)
msg91456 - (view) Author: Mike Cowperthwaite (mcow) Date: 2009-08-10 17:09
"Remove" and "unlink" are not the most widely-known verbs that come
to mind when thinking about deleting objects from the filesystem.
A recent Google search for "python delete file" led to the documentation
for the 'os' module:
  http://docs.python.org/library/os.html
but searching within that page for "delet" completely misses
os.remove(), os.unlink(), and os.rmdir().

Suggest simply expanding the first sentence of os.remove()'s paragraph to:
   Remove the file /path/ (delete the file).

Similarly for os.rmdir():
   Remove the directory /path/ (delete the directory).

Also regarding os.rmdir(), it would be nice to add a mention here of
this information from os.walk(): "rmdir() doesn’t allow deleting a
directory before the directory is empty."

The URL above is for the 2.6 version (chapter 16.1.4); also seen in the
3.1 documentation (15.1.5); presumably it's also in the development
versions.  Patching backwards as far as feasible would be appreciated.
msg91586 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2009-08-15 02:38
If a change is make, 'remove (delete)' would be sufficient.
msg91930 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2009-08-24 17:25
Fixed in r74548.
msg91932 - (view) Author: Mike Cowperthwaite (mcow) Date: 2009-08-24 17:41
Thanks, but the bug requested a similar change for "rmdir" as well.

Is it not possible to backport the change to the 2.x branch?
msg91933 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2009-08-24 17:49
True. Fixed in r74550.

The changes will be ported to all maintained branches soon.
msg91934 - (view) Author: Mike Cowperthwaite (mcow) Date: 2009-08-24 18:04
Very good.  Thank you, Georg.
History
Date User Action Args
2009-08-24 18:04:00mcowsetmessages: + msg91934
2009-08-24 17:49:08georg.brandlsetmessages: + msg91933
2009-08-24 17:41:33mcowsetmessages: + msg91932
2009-08-24 17:25:10georg.brandlsetstatus: open -> closed
resolution: fixed
messages: + msg91930
2009-08-15 02:38:34terry.reedysetnosy: + terry.reedy
messages: + msg91586
2009-08-10 17:09:51mcowcreate