Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

3
  • OK, thanks, but in what sense is '/foo/' an absolute path on windows? This strikes me as surprising, and platform-inconsistent behaviour. Commented Oct 23, 2011 at 9:25
  • It's a drive-absolute path. It would actually make sense to keep the drive letter from the first element: os.path.join('C:\\Users\\Marcin', '\\oneclickos\\') -> 'C:\\oneclickos\\' but that's not how it works. Commented Oct 23, 2011 at 9:29
  • 2
    It isn't inconsistent at all if you ask me. Starting with a directory seperator means absolute path on many (all?) other platforms as well. You may object to the lack of a drive letter, but my memory and Wikipedia say it's perfectly valid and simply refers to an absolute path on the same drive. Commented Oct 23, 2011 at 9:30