Ram Rachum <ram at rachum.com> added the comment: Just return len(str(path)). I put the use case on the PR on GitHub. ---------- _______________________________________ Python tracker <report at bugs.python.org> <https://bugs.python.org/issue40752> _______________________________________