Uh oh!
There was an error while loading. Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Made this part a bit more specific, but can use original suggested wording if wanted
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is not true. For example,
os.path.join('', '')->''. On Windows,os.path.join('c:', '')->'c:'.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a good point. Then perhaps instead,
is empty, and if *path* is not a root dir or empty, then .... It can also be optionally less specific, and say,... the result will generally end in the ....There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is problematic, because the term "root dir" needs explanation, especially on Windows.
What if just say that empty members are ignored, except the last one?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If it needs some explanation, then maybe we give a quick example and phrase it as "... and if path is a root directory (i.e., / or c:) or empty, then ..."
For your second statement, do you mean leaving out the note on platform separators? It seems a bit too noteworthy to leave it out though. It could be phrased differently like,
If the last element of paths is empty, the result will end in the platform's directory separator, unless path is empty or a root directory.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I afraid that it would be too verbose and still not clear. It is not good place to introduce a new term, especially if it may conflict with the meaning in other sites.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see, you would prefer to keep it a bit vague, like
The return value is the concatenation of *path* and any non-empty members of *paths* separated by the platform's directory separator character. Empty members of *paths* are ignored except for the last path. If a component is an absolute path, ...?