Eryk Sun <eryk...@gmail.com> added the comment:

os.path.join and pathlib are working as designed and documented. Similarly in 
POSIX we have the following:

    >>> p = os.path.join("/123/345", "/", "folder///filename.bin")
    >>> print(p)
    /folder///filename.bin
    >>> print(os.path.normpath(p))
    /folder/filename.bin

The difference is that in Windows there's no root ("/") filesystem, but instead 
a set of DOS devices (e.g. "C:", "CON:") and UNC shares (e.g. 
r"\\server\share"), so the Windows implementation of join() uses the drive from 
the already-joined components in order to resolve a rooted component.

----------
nosy: +eryksun
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue35223>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to