[New-bugs-announce] [issue23146] Incosistency in pathlib between / and \

Serhiy Storchaka report at bugs.python.org
Fri Jan 2 10:40:25 CET 2015

New submission from Serhiy Storchaka:

>>> pathlib.PureWindowsPath('c:/a/b', '/x/y')
>>> pathlib.PureWindowsPath('//?/c:/a/b', '/x/y')
>>> pathlib.PureWindowsPath(r'\\?\c:\a\b', '/x/y')

I suppose this is because in parse_parts() altsep is replaced with sep before calling self.splitroot() in main loop but not in other loop (if drv or root). Line 76.

components: Library (Lib)
messages: 233308
nosy: pitrou, serhiy.storchaka
priority: normal
severity: normal
stage: needs patch
status: open
title: Incosistency in pathlib between / and \
type: behavior
versions: Python 3.4, Python 3.5

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list