classification
Title: Reference to subclass method resolve() in PurePath docs
Type: Stage:
Components: Documentation Versions: Python 3.10, Python 3.9, Python 3.8, Python 3.7, Python 3.6
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: docs@python Nosy List: docs@python, john.engelke
Priority: normal Keywords:

Created on 2020-11-25 16:38 by john.engelke, last changed 2020-11-25 16:38 by john.engelke.

Messages (1)
msg381848 - (view) Author: John Engelke (john.engelke) Date: 2020-11-25 16:38
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
History
Date User Action Args
2020-11-25 16:38:57john.engelkecreate