[New-bugs-announce] [issue42465] Reference to subclass method resolve() in PurePath docs

John Engelke report at bugs.python.org
Wed Nov 25 11:38:57 EST 2020


New submission from John Engelke <john.engelke at gmail.com>:

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

----------
assignee: docs at python
components: Documentation
messages: 381848
nosy: docs at python, john.engelke
priority: normal
severity: normal
status: open
title: Reference to subclass method resolve() in PurePath docs
versions: Python 3.10, Python 3.6, Python 3.7, Python 3.8, Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue42465>
_______________________________________


More information about the New-bugs-announce mailing list