- Returns the object with the path, unless absolute_result is set to False, in which
- case it returns a tuple containing the deepest object found along the path, and the
- remainder of the path after that object as a string (or None if there is no remaining
- path). Raises a DoesNotExist exception if no object is found with the given path.
-
- If the path you're searching for is known to exist, it is always faster to use
- absolute_result=True - unless the path depth is over ~40, in which case the high cost
- of the absolute query makes a binary search (i.e. non-absolute) faster.
+ If ``absolute_result`` is ``True``, returns the object at ``path`` (starting at ``root``) or raises a :class:`DoesNotExist` exception. Otherwise, returns a tuple containing the deepest object found along ``path`` (or ``root`` if no deeper object is found) and the remainder of the path after that object as a string (or None if there is no remaining path).
+
+ .. note:: If you are looking for something with an exact path, it is faster to use absolute_result=True, unless the path depth is over ~40, in which case the high cost of the absolute query may make a binary search (i.e. non-absolute) faster.
+
+ .. note:: SQLite allows max of 64 tables in one join. That means the binary search will only work on paths with a max depth of 127 and the absolute fetch will only work to a max depth of (surprise!) 63. Larger depths could be handled, but since the common use case will not have a tree structure that deep, they are not.
+
+ :param path: The path of the object
+ :param root: The object which will be considered the root of the search
+ :param absolute_result: Whether to return an absolute result or do a binary search
+ :param pathsep: The path separator used in ``path``
+ :param field: The field on the model which should be queried for ``path`` segment matching.
+ :returns: An instance if absolute_result is True or (instance, remaining_path) otherwise.
+