Barry A. Warsaw added the comment:

Aren't negative indexes well defined in Python?  E.g.

>>> p = Path('/tmp/tmp123/foo/bar/baz.xz')
>>> p.parents[len(p.parents)-2]
PosixPath('/tmp')

p.parents[-2] should == p.parents[len(p.parents)-2]

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue21041>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to