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
os.listdir(bytes) gives a list of bytes, but os.listdir(buffer) gives a list of unicodes #75062
Comments
The >>> os.listdir(b".")
[b'python', b'Include', b'python-config.py', ...]
>>> os.listdir(bytearray(b"."))
['python', 'Include', 'python-config.py', ...] |
Good catch Armin! PR 2634 fixes this inconsistency. Maybe it is worth to deprecate support of other bytes-like object except bytes. open(), os.fspath() and os.path functions don't support them. |
I've also been pointed to https://bugs.python.org/issue26800 . |
Oh, I forgot that this feature already is deprecated! |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: