Message 380148 - Python tracker
Message380148
| Author | armins.bagrats |
|---|---|
| Recipients | armins.bagrats |
| Date | 2020-11-01.15:48:23 |
| SpamBayes Score | -1.0 |
| Marked as misclassified | Yes |
| Message-id | <1604245703.4.0.361207259352.issue42234@roundup.psfhosted.org> |
| In-reply-to |
| Content | |
|---|---|
In the docs (https://docs.python.org/3/library/pathlib.html#pathlib.PurePath.relative_to) PurePath.relative_to() is specified to fail for arguments that are not on the original path (e.g. Path('/ham/beans').relative_to(Path('/spam'))). I believe it would be useful to extend the behaviour of relative_to so that it handles the case above. For example, I would expect Path('/ham/beans').relative_to(Path('/spam')) to return Path('../ham/beans'). If this sounds like a useful change I'd be happy to make a PR for it. |
|
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2020-11-01 15:48:23 | armins.bagrats | set | recipients: + armins.bagrats |
| 2020-11-01 15:48:23 | armins.bagrats | set | messageid: <1604245703.4.0.361207259352.issue42234@roundup.psfhosted.org> |
| 2020-11-01 15:48:23 | armins.bagrats | link | issue42234 messages |
| 2020-11-01 15:48:23 | armins.bagrats | create | |