[issue22302] Windows os.path.isabs UNC path bug

Steve Dower report at bugs.python.org
Fri Sep 5 18:32:59 CEST 2014


Steve Dower added the comment:

Antoine almost certainly thought about this with pathlib and may know about the change, or at least have some decent context on it.

I'm more inclined to think that os.path.isabs(r"\\server") should also return False, since it's not a path that can be opened directly unless you add more path before or after it.

Indeed, pathlib seems to support my understanding:

>>> Path('//server').is_absolute()
False
>>> Path('//server/share').is_absolute()
True
>>> Path('//server/share/').is_absolute()
True
>>> Path('//server/share/file').is_absolute()
True

If the regression appeared in 3.4, it should be easy enough to look at what changed.

----------
nosy: +pitrou, steve.dower

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue22302>
_______________________________________


More information about the Python-bugs-list mailing list