Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider adding six.fspath #291

Open
joaoe opened this issue May 24, 2019 · 0 comments
Open

Consider adding six.fspath #291

joaoe opened this issue May 24, 2019 · 0 comments

Comments

@joaoe
Copy link

joaoe commented May 24, 2019

Hi.

Python 3.6 has os.fspath which is supposed to be the standard way to get a file path from a PathLike object, e.g., file objects.
https://docs.python.org/3/library/os.html?highlight=os%20fspath#os.fspath

In Python 2 and earlier Python 3s, the way to do it is file_obj.name.

Request: add fspath and PathLike to six.py. There is an official implementation that could be copied:
https://github.com/python/cpython/blob/master/Lib/os.py#L1025

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant