This optimization seems to short-circuit navtree-searches when the input path is longer than any of the indexed values – self._depth in the code.
The behavior is inconsistent, because as long as the input path length is shorter or equal to the longest indexed path, there is no requirement that the entire path is indexed already.
This optimization seems to short-circuit navtree-searches when the input path is longer than any of the indexed values –
self._depth
in the code.The behavior is inconsistent, because as long as the input path length is shorter or equal to the longest indexed path, there is no requirement that the entire path is indexed already.