◐ Shell
clean mode source ↗

Message 374639 - Python tracker

PureWindowsPath does not know about POSIX paths, it supports the two styles of directory separator that are valid on Windows: '/' and '\'. 

PurePosixPath only supports the single stile of directory separator valid on POSIX systems: '/'. 

On a Posix system backslash is a valid character in a file name and is NOT a directory separator.


The behaviour of Path.resolve() on Windows may or may not be a bug, the documentation is not quite clear. Personally I'd lean toward saying this is a bug, but I defer to a pathlib expert.  Note that path.resolve(strict=True) should raise an error on both platforms when the path does not exists.