Jason R. Coombs <jar...@jaraco.com> added the comment: Based on the response, then the documentation is inadequate. I don't want to make a stink about this, but I think the issue is still unresolved. If it would be better to discuss this elsewhere, please advise.
The documentation says "Return a relative filepath to path either from the current directory or from an optional start point". The documentation should say "Return a relative filepath to a path, where path is considered relative to the current directory, either from the current directory or from an optional start point. On Windows, a ValueError is raised if the current directory and the start path are not on the same drive." The clarification is that the path specified is _not_ relative to the start point (which would have been my guess), but is relative to another unspecified environmental condition (the current directory). To leave out this clarification means that this implicit behavior is left to the user to discover rather than to state that it's by design. For my purposes, I wanted a function that would calculate a target based on a start path and a relative or absolute path from it. Based on the documentation, I thought relpath was it. I understand better now what the purpose of relpath is, and it's not what I was expecting. I think the documentation could be improved to help manage this expectation for other users. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue7195> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com