[issue15148] shutil.which() docstring could be clearer

Alexander Belopolsky report at bugs.python.org
Sat Jun 23 04:09:47 CEST 2012


Alexander Belopolsky <alexander.belopolsky at gmail.com> added the comment:

*file* is correct because shutil.which() is more general than shell which command.  (It can be used to find source files on PYTHONPATH, for example.)

I think the confusing part is "return the path ... on the path."  This can be fixed in reST by marking the second "path" as the argument, but the docstring should be rephrased.  Note that reST documentation for shutil.which() is missing in Doc/library/shutil.rst.

----------
nosy: +belopolsky, brian.curtin

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


More information about the Python-bugs-list mailing list