[issue39090] Document various options for getting the absolute path from pathlib.Path objects
Barney Gale <barney.gale@gmail.com> added the comment: The docs for PurePath.is_absolute() say:
A path is considered absolute if it has both a root and (if the flavour allows) a drive
This does not preclude it from having ".." segments. PurePath.absolute() is documented as of bpo-29688 / 3.11, see: https://docs.python.org/3.11/library/pathlib.html#pathlib.Path.absolute The documentation for the absolute() method is deliberately placed alongside resolve() for ease of comparison. Both methods make a path absolute, but resolve() also follows symlinks, and consequently is able to safely elide ".." segments. ---------- _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue39090> _______________________________________
participants (1)
-
Barney Gale