New submission from Domenico Ragusa <[email protected]>:
Can we improve pathlib.relative_to(other) so that it handles the case of a path
not being a direct child of other, like os.path.relpath?
For example:
Path('/some/thing').relative_to('/foo') -> Path('../some/thing')
At the moment it just raises an exception.
----------
components: Library (Lib)
files: pathlib.diff
keywords: patch
messages: 366958
nosy: Domenico Ragusa
priority: normal
severity: normal
status: open
title: pathlib's relative_to should behave like os.path.relpath
type: enhancement
versions: Python 3.9
Added file: https://bugs.python.org/file49081/pathlib.diff
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue40358>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com