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

open() should accept "rb" attributes #407

Open
l0ud opened this issue Mar 1, 2023 · 0 comments
Open

open() should accept "rb" attributes #407

l0ud opened this issue Mar 1, 2023 · 0 comments
Labels
Bug good first issue Help Wanted We will be glad if somebody proposes a solution via PR

Comments

@l0ud
Copy link

l0ud commented Mar 1, 2023

Hi. I have a code that is using native paths and antifactory paths to read files in binary mode. I'm struggling with open() limitation to have only "r" mode supported, not "rb".
As far as I see, files are opened in binary mode anyway (when reading line-by-line I'm seeing bytes instead of strings).
This makes code awkward, as I need to specify "rb" to native paths and "r" to artifactory paths, even they are all binary.
Can open function not throw an error when passing "rb" instead of "r" parameter?

@allburov allburov added Bug good first issue Help Wanted We will be glad if somebody proposes a solution via PR labels Mar 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug good first issue Help Wanted We will be glad if somebody proposes a solution via PR
Development

No branches or pull requests

2 participants