Skip to content

Include all file object operations in IO[AnyStr] #338

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

Closed
JukkaL opened this issue Jul 26, 2014 · 0 comments
Closed

Include all file object operations in IO[AnyStr] #338

JukkaL opened this issue Jul 26, 2014 · 0 comments

Comments

@JukkaL
Copy link
Collaborator

JukkaL commented Jul 26, 2014

Currently the typing.IO[AnyStr] ABC only has operations that are valid for both binary and text files. This is sometimes awkward. Potentially add the entire file object interface to IO[AnyStr] so that IO[Any] supports both the text and binary file interfaces. We might then be able to get rid of TextIO and BinaryIO classes. This would simplify the programming model at the cost of some type checking precision. However, some code that is currently not statically typable would be (more) typable, so there might actually even be a net benefit in static typing precision.

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

No branches or pull requests

2 participants