[New-bugs-announce] [issue4478] shutil.copyfile documentation

steve21 report at bugs.python.org
Mon Dec 1 05:38:38 CET 2008


New submission from steve21 <steve872929-bv at yahoo.com.au>:

$ python3.0
Python 3.0rc3 (r30rc3:67312, Nov 22 2008, 21:38:46)
>>> import shutil
>>> shutil.copyfile('/tmp/f', '/tmp/f')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/a/lib/python3.0/shutil.py", line 47, in copyfile
    raise Error("`%s` and `%s` are the same file" % (src, dst))
shutil.Error: `/tmp/f` and `/tmp/f` are the same file

The Python 3 docs at
http://docs.python.org/dev/3.0/library/shutil.html#module-shutil
mention that copyfile can raise IOError, but they omit to mention that
copyfile can also raise shutil.Error.

Also, just out of interest, I notice that Sphinx now supports the
':raises:' field. Are there any plans for the Python documentation to
start using it?

----------
assignee: georg.brandl
components: Documentation
messages: 76673
nosy: georg.brandl, steve21
severity: normal
status: open
title: shutil.copyfile documentation
versions: Python 3.0

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


More information about the New-bugs-announce mailing list