Roy Smith <r...@panix.com> added the comment:
The https://bitbucket.org/cliff/cpython#python24258 URL 404's Looking at the attached bz2.py diff, I would change: if isinstance(filename, (str, bytes, os.PathLike)): self._fp = _builtin_open(filename, mode) + self.filename = filename self._closefp = True self._mode = mode_code to special-case os.PathLike and do: self.filename = str(filename) I would expect BZ2File.name to be a string. Returning a PathLike means lots of legitimate string methods will not work on it. Also, it should be "name" as an attribute, not "name()" as a method, to match other existing interfaces. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue24258> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com