[issue30177] pathlib.resolve(strict=False) only includes first child

Michael Shuffett report at bugs.python.org
Wed Apr 26 12:19:45 EDT 2017


New submission from Michael Shuffett:

According to the documentation https://docs.python.org/3/library/pathlib.html#pathlib.Path.resolve
If strict is False, the path is resolved as far as possible and any remainder is appended without checking whether it exists.

The current behavior is not consistent with this, and only appends the first remainder.

For example:
If we have an empty '/tmp' directory
Path('/tmp/foo').resolve() and Path('/tmp/foo/bar').resolve() both result in Path('/tmp/foo') but Path('/tmp/foo/bar').resolve() should result in Path('/tmp/foo/bar')

----------
components: Library (Lib)
messages: 292369
nosy: mshuffett
priority: normal
severity: normal
status: open
title: pathlib.resolve(strict=False) only includes first child
type: behavior
versions: Python 3.6, Python 3.7

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue30177>
_______________________________________


More information about the Python-bugs-list mailing list