[issue41565] from os.path import join join('3', '{:3') return '{:3' in windows

Eryk Sun report at bugs.python.org
Tue Aug 18 04:41:25 EDT 2020


Eryk Sun <eryksun at gmail.com> added the comment:

It's worth mentioning that pathlib restricts the first character of a Windows drive name to the set of ASCII letters in pathlib._WindowsFlavour.drive_letters. For example:

    >>> Path('3') / 'C:3'
    WindowsPath('C:3')

vs.

    >>> Path('3') / '{:3'
    WindowsPath('3/{:3')

This design supports normal DOS drive names such as drives assigned automatically or via diskmgmt.msc, diskpart.exe, and so on.

----------

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


More information about the Python-bugs-list mailing list