-
Notifications
You must be signed in to change notification settings - Fork 39
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
Writing enums: pre_assert? #272
Comments
Hi, thanks for your report! There are a couple of things you could do now:
Another option might be to map to a tuple at the top level but that would require #39 to be implemented. I am not sure how to make this API less confusing. Are you passing in |
I'll try refactoring a bit based on the suggestions. I hadn't been using magic because there is tricky common header stuff that goes between
Items 2 and 3 make it hard to see how to parse with It's this mess, for reference: https://docs.hdfgroup.org/hdf5/v1_14/_f_m_t3.html#V2ObjectHeaderPrefix |
Sounds like you want approach 1 that csnover laid out, then, and you're using pre_assert + import as you should be for that approach. You might want a helper method on Good luck with the messy format! It's worth noting here that binrw has unfortunately not really gained good support for writing offsets yet, so that might be a bit of a struggle. (see #4) |
I have code like this:
bw
/brw
don't allowpre_assert
so they can't serialize this. Is there a way to reverse parsing an enum like this? Is it feasible to implementpre_assert
forbrw
?... I don't think usingassert
is correct.The text was updated successfully, but these errors were encountered: