◐ Shell
clean mode source ↗

gh-77607: Rephrase documentation of os.path.join() by slateny · Pull Request #98995 · python/cpython

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.