Yaroslav Pankovych added the comment:
Agree with that, it currently supports this behavior.
--
___
Python tracker
<https://bugs.python.org/issue21041>
___
___
Yaroslav Pankovych added the comment:
And it looks like a special case, so "Special cases aren't special enough to
break the rules."
--
___
Python tracker
<https://bugs.pyt
Yaroslav Pankovych added the comment:
That makes sense, but should we have this behaviour only for negative indices?
We'll end up with something lie:
path.parents[len(path.parents) - 1] != path.parents[-1]
I think that is should be consistent regardless of negative/positive in
Yaroslav Pankovych added the comment:
Any thoughts about that folks? It's a pretty old bug, let's decide smth for it.
--
___
Python tracker
<https://bugs.python.o
Yaroslav Pankovych added the comment:
Here's possible fix: https://github.com/python/cpython/pull/21799
--
___
Python tracker
<https://bugs.python.org/is
Yaroslav Pankovych added the comment:
That's kinda weird for python. I mean, in regular list/etc if I need the last
element, I'd normally do list[-1], but here to get the last parent, I need to
actually know how many parents do I have.
So now, I can do something