diff options
author | arcadia-devtools <[email protected]> | 2022-06-09 19:02:01 +0300 |
---|---|---|
committer | arcadia-devtools <[email protected]> | 2022-06-09 19:02:01 +0300 |
commit | 4a29d649866ff133e0b8f8a1009e1000a44d7279 (patch) | |
tree | 547229aded91b3760628c646a144af604f1c3e2b /contrib/tools/python3/src/Lib/pathlib.py | |
parent | 782f2445a283aed9a66e699137b3349af1689c29 (diff) |
intermediate changes
ref:478170c7a5a1c0788ddd0d6513ce4ed86d7d7c99
Diffstat (limited to 'contrib/tools/python3/src/Lib/pathlib.py')
-rw-r--r-- | contrib/tools/python3/src/Lib/pathlib.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/contrib/tools/python3/src/Lib/pathlib.py b/contrib/tools/python3/src/Lib/pathlib.py index 621fba0e75c..97b23ca45a3 100644 --- a/contrib/tools/python3/src/Lib/pathlib.py +++ b/contrib/tools/python3/src/Lib/pathlib.py @@ -528,6 +528,8 @@ class _PathParents(Sequence): if idx >= len(self) or idx < -len(self): raise IndexError(idx) + if idx < 0: + idx += len(self) return self._pathcls._from_parsed_parts(self._drv, self._root, self._parts[:-idx - 1]) |