The text:
'If you want to walk an arbitrary filesystem path upwards, it is recommended to first call Path.resolve() so as to resolve symlinks and eliminate “..” components.'
should be moved or changed to
'If you want to walk a concrete path upwards, it is recommended to first call Path.resolve() so as to resolve symlinks and eliminate “..” components.'
Rationale: Wording is confusing as the resolve() method doesn't exist for PurePath, PurePosixPath nor PureWindowsPath. It's unclear that the method applies only to concrete implementations of the Path subclass.
This should be resolved by either altering the above text or (preferably) moving it to the concrete Path section.
NOTE: PurePath (PurePosixPath, PureWindowsPath) operations are described in docs as "purely computational" components that "don’t actually access a filesystem." https://docs.python.org/3.7/library/pathlib.html#pure-paths
|