[New-bugs-announce] [issue36305] Inconsistent behavior of pathlib.WindowsPath with drive paths

Maor Kleinberger report at bugs.python.org
Fri Mar 15 11:37:05 EDT 2019


New submission from Maor Kleinberger <kmaork at gmail.com>:

The behavior of WindowsPath is undefined when used with drive paths, specifically with no trailing slash:

WindowsPath('cc:').absolute() -> WindowsPath('C:/Users/maor/cc:')
WindowsPath('c:').absolute() -> WindowsPath('c:') 
WindowsPath('c:').is_absolute() -> False
WindowsPath('c:') / 'p' -> WindowsPath('c:p')
WindowsPath('c:p').absolute() -> WindowsPath('c:p')
WindowsPath('c:p').is_absolute() -> False

----------
components: Library (Lib)
messages: 337999
nosy: kmaork
priority: normal
severity: normal
status: open
title: Inconsistent behavior of pathlib.WindowsPath with drive paths
type: behavior
versions: Python 3.6, Python 3.7, Python 3.8

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue36305>
_______________________________________


More information about the New-bugs-announce mailing list