Fix unpacking with dynamic offsets#57
Merged
MatrixEditor merged 1 commit intoFeb 6, 2026
Merged
Conversation
`_ContextLambda` is `ExprMixin` which overwrites `__eq__`. The `__contains__` function for tuples delegates to `__eq__` and this interaction means that `_has_offset` and `_keep_pos` will be unconditionally false and true when using a dynamic offset.
MatrixEditor
added a commit
that referenced
this pull request
Feb 6, 2026
--- Move all parsing and building related functions (pack*, unpack*, sizeof) into a separate file for easy import handling. Refs: #57
Owner
|
Hi @tsheinen, thanks for pointing out the issue with arbitrary offsets. The changes you proposed will fix unpacking - the same issue of context-lambda comparisons repeats across the I would like to merge this request if there are no other questions regarding this topic. |
Contributor
Author
|
sounds good to me, thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
_ContextLambdaisExprMixinwhich overwrites__eq__. The__contains__function for tuples delegates to__eq__and this interaction means that_has_offsetand_keep_poswill be unconditionally false and true when using a dynamic offset.Pack doesn't seem to work either, but I wasn't able to puzzle out why. I added tests here to snapshot the current behavior.