-
Notifications
You must be signed in to change notification settings - Fork 19
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
SIM115: with context handler for opening files #17
Comments
Hi, First of all: great work! Maybe you could consider this below:
(I know, i could use load(f) too)
Or writing a binary is just:
Long story short, for the open/ read or write all / close pattern could be made |
That is pretty amazing! I wasn't aware of it. Thank you very much 🤗 This is currently blocked by issue #21 at the moment, so I will first continue with the easier ones. |
Maybe this? It has a functional interface too, not just command line version. |
#21 is resolved; time to tackle this one. Bad code:
AST of bad code:
|
Explanation
Using a context handler is shorter and avoids the error of forgetting to close a file handle.
Example
The text was updated successfully, but these errors were encountered: