-
Notifications
You must be signed in to change notification settings - Fork 60
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
Simplify write_to and context manager usage. #118
Simplify write_to and context manager usage. #118
Conversation
@mdboom - this looks much more intuitive to me, thanks! I agree that the streaming API is more advanced so it's less important for that to be convenient. |
@nden: This is going to be a bit of a breaking API change. Basically |
d9b4927
to
b56f781
Compare
b56f781
to
617ec90
Compare
Simplify write_to and context manager usage.
I guess this is already merged, but I think I like this better too. I've seen other recent cases where people were confused (in a non-ASDF context, I think) about using read/write on objects that are not stream-like objects and don't have the same semantics as, say, file.read and file.write. |
Update note regarding layout of docs directory (see #118).
I feel like it might be desirable to salvage something like the streaming API in the future, only even better--allow writing to a file object, but with protections in place to ensure that it only writes to the correct places, etc. But that can be for another time. In the meantime I also find this more intuitive 👍 |
This is an alternative to #116. Fix #107, fix #109.
This is an attempt to fix up context manager usage at the expense of:
write_to
and thenupdate
-- one mustopen
and thenupdate
.@astrofrog: Your thoughts?