Skip to content
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

intelhex hangs on using in operator #58

Open
sveinse opened this issue Jul 21, 2022 · 2 comments
Open

intelhex hangs on using in operator #58

sveinse opened this issue Jul 21, 2022 · 2 comments

Comments

@sveinse
Copy link

sveinse commented Jul 21, 2022

In python, using the in operator is used to test for membership, thus it would be natural to expect that the following expression is valid to test if the given address is present in the hex. However it hangs of an unknown reason.

     is_present = 0x1000 in ih

This has a trivial fix by implementing __contains__. I have implemented a fix and a test for it in my fork: https://github.com/sveinse/intelhex. Please give notice if a PR is wanted for this. https://github.com/sveinse/intelhex

master...sveinse:intelhex:master

sveinse added a commit to sveinse/intelhex that referenced this issue Jul 21, 2022
@bialix
Copy link
Member

bialix commented Dec 20, 2022

Looks good for me. Thanks.

@bialix
Copy link
Member

bialix commented Dec 20, 2022

Please, create a pull request, so maintainer can easily merge this.

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