◐ Shell
clean mode source ↗

pathlib: inconsistent handling of rootless Windows paths

>>> from pathlib import PureWindowsPath
>>> a = 'C:/a/b'
>>> b = 'C:x/y'
>>> PureWindowsPath(a, b)
PureWindowsPath('C:x/y')
>>> PureWindowsPath(a) / b
PureWindowsPath('C:/a/b/x/y')

Seems to be the only case where the PureWindowsPath constuctor and joinpath() disagree when given the same arguments. This has implications for future work, so I'd love to make them consistent.

Affects all supported versions of Python.