Eric V. Smith <e...@trueblade.com> added the comment:

But that's a perfectly valid filename:

$ mkdir -p adl://myblob.azuredatalakestore.net/local/abc/xyz
$ ls -R adl:
'adl:':
myblob.azuredatalakestore.net/

'adl:/myblob.azuredatalakestore.net':
local/

'adl:/myblob.azuredatalakestore.net/local':
abc/

'adl:/myblob.azuredatalakestore.net/local/abc':
xyz/

'adl:/myblob.azuredatalakestore.net/local/abc/xyz':

The pathlib module isn't going to guess whether you passed it a filename or URI 
of some sort, especially when it's a valid filename. That's the caller's job to 
get right.

Removing the double slashes is a normal part of pathlib's behavior of 
normalizing paths, just as if you said from a bash shell "ls //etc//sysconfig", 
which will show the contents of "/etc/sysconfig". Although I'll admit I 
couldn't find this documented anywhere with a quick search.

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

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

Reply via email to