the pathlib.Path.parents[-1] didn't receive the self._parts
#93156
Labels
type-bug
An unexpected behavior, bug, or error
Bug report
the
pathlib.Path.parents[-1]didn't receive theself._partsexample:
source code in
pathlib.py:when the idx is -1,
-idx - 1 = 0. so theself._parts[: -idx -1 ]is empty. hence then theparents[-1] != parents[2]because the_partsis different.Your environment
Manjaro Linux 21.2.6 Linux manjaro-5800 5.4.195-1-MANJARO #1 SMP PREEMPT Wed May 18 09:23:31 UTC 2022 x86_64 GNU/LinuxThe text was updated successfully, but these errors were encountered: