Serhiy Storchaka <storchaka+cpyt...@gmail.com> added the comment:
The custom `__fspath__()` handling is used in `path_converter` for better error reporting. The error message can include names of the function and the argument. PyOS_FSPath() can not provides this information. I agree that error reporting about incorrect type of the __fspath__() result should be improved. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue35942> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com