[New-bugs-announce] [issue6677] Place the term "delete" within the documentation for os.remove() and os.rmdir()

Mike Cowperthwaite report at bugs.python.org
Mon Aug 10 19:09:52 CEST 2009


New submission from Mike Cowperthwaite <mikec at lathropengineering.com>:

"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.

----------
assignee: georg.brandl
components: Documentation
messages: 91456
nosy: georg.brandl, mcow
severity: normal
status: open
title: Place the term "delete" within the documentation for os.remove() and os.rmdir()
versions: Python 2.6, Python 3.1

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


More information about the New-bugs-announce mailing list