Message393731
New PR up here: https://github.com/python/cpython/pull/26153
The correspondence between `pathlib` and `os.path` is as follows:
- `Path.resolve()` is roughly `os.path.realpath()`
- `Path.absolute()` is roughly `os.path.abspath()`
Differences:
- `resolve()` always raises RuntimeError on symlink loops, whereas `realpath()` either raises OSError or nothing depending on *strict*.
- `absolute()` doesn't normalize the path, whereas `abspath()` does. Normalizing without resolving symlinks can change the meaning of the path, so pathlib does the better thing here. |
|
Date |
User |
Action |
Args |
2021-05-15 22:19:38 | barneygale | set | recipients:
+ barneygale, brett.cannon, pitrou, methane, docs@python, serhiy.storchaka, eryksun, Jim Fasarakis-Hilliard, 4-launchpad-kalvdans-no-ip-org |
2021-05-15 22:19:38 | barneygale | set | messageid: <1621117178.47.0.325972540017.issue29688@roundup.psfhosted.org> |
2021-05-15 22:19:38 | barneygale | link | issue29688 messages |
2021-05-15 22:19:38 | barneygale | create | |
|