bpo-34260: fix docstring of shutil.copy2 by csernazs · Pull Request #8523 · python/cpython (original) (raw)

I've changed the rst. I think it is written well mostly, so only the text 'all' has been replaced to 'more', which is correct now I believe.

'mode bits' has been replaced everywhere to 'mode' as you suggested. Also, I decided to write the concrete list of what metadata is copied by copystat, and copy2() refers to it to avoid unnecessary duplicating of the docstring.

st_flags is actually returned by stat() on some systems (*bsd and osx I believe), so I kept it there (I think it is not in stat_info's repr()), with the notation that flags is only copied when os.chflags() is available and st_flags is returned by stat(). More info about chflags: https://www.freebsd.org/cgi/man.cgi?query=chflags