[issue23082] pathlib relative_to() can give confusing error message

Steve Dower report at bugs.python.org
Tue Apr 14 15:23:26 EDT 2020


Steve Dower <steve.dower at python.org> added the comment:

I agree it's worth improving the error message (and probably the docs too).

It's never made clear that relative_to only looks deeper (won't ever generate leading ".." parts) - the closest hint in the docs is that os.path.relpath is different (and that isn't even in the relative_to() section).


Tagging this easy/newcomer friendly. If you'd like to work on it, just post here - I'm happy to help get it merged.

----------
keywords: +easy, newcomer friendly
nosy: +steve.dower
versions: +Python 3.8, Python 3.9 -Python 3.4

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


More information about the Python-bugs-list mailing list