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

support 'in' and 'not in' operator #40

Merged
merged 2 commits into from
Jul 20, 2017
Merged

support 'in' and 'not in' operator #40

merged 2 commits into from
Jul 20, 2017

Conversation

reverbc
Copy link
Contributor

@reverbc reverbc commented Jun 6, 2017

Adding support for the in and not in operator by implementing __contains__() method as the following example:

>>> 'child' in untangle.parse('<root/>').root
... False
>>> 'child' in untangle.parse('<root><child>value</child></root>').root
... True

This could be useful when dealing with dynamic xml API response.

@coveralls
Copy link

coveralls commented Jun 6, 2017

Coverage Status

Coverage increased (+0.3%) to 35.577% when pulling 63baee5 on reverbc:support-membership-operator into 2119763 on stchris:master.

@stchris
Copy link
Owner

stchris commented Jul 16, 2017

Very nice! Can you add yourself to the AUTHORS file as well?

@reverbc
Copy link
Contributor Author

reverbc commented Jul 17, 2017

@stchris Just did. Thanks for accepting the PRs 🎉

@coveralls
Copy link

coveralls commented Jul 17, 2017

Coverage Status

Coverage increased (+0.2%) to 35.514% when pulling 87fb7f1 on reverbc:support-membership-operator into 2119763 on stchris:master.

@stchris stchris merged commit a18c171 into stchris:master Jul 20, 2017
@reverbc reverbc deleted the support-membership-operator branch July 21, 2017 22:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants