Serhiy Storchaka <storchaka+cpyt...@gmail.com> added the comment:

I understand why this problem arose. If you parse an HTTP URL, its path always 
starts with "/" if not empty. And you usually want to interpret it as a 
relative to some base directory. But lstrip('/') works well here. In any case 
you need to have some validation to disallow "..".

I think that adding yet one operation will confuse users. And what to do with 
C:\foo\bar, C:foo\bar, \\?\c\foo\bar, etc?

----------
nosy: +serhiy.storchaka

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

Reply via email to