-
Notifications
You must be signed in to change notification settings - Fork 40
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
"contains" method for Object "in" operations added #188
Conversation
tp_as_sequence added
Need to resolve conflict and failing test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a couple minor changes on the tests and I think its good to go
tests/python/test_dicts_lists.py
Outdated
pm.eval("let obj = {'c':5}") | ||
a = pm.eval('obj') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pm.eval("let obj = {'c':5}") | |
a = pm.eval('obj') | |
a = pm.eval("({'c':5})") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change would ensure that the object remains rooted as long as a
exists, since as written the object will be permanently rooted since its declared and assigned at global scope.
tests/python/test_dicts_lists.py
Outdated
pm.eval("let obj1 = {'c':5}") | ||
a = pm.eval('obj1') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pm.eval("let obj1 = {'c':5}") | |
a = pm.eval('obj1') | |
a = pm.eval("({'c':5})") |
tests/python/test_dicts_lists.py
Outdated
pm.eval("let obj2 = {'c':5}") | ||
a = pm.eval('obj2') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pm.eval("let obj2 = {'c':5}") | |
a = pm.eval('obj2') | |
pm.eval("({'c':5})") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
now support the "in" operation for Dicts
cleanup unused method
fix memory leak
closes #187
Does not implement "in" for Lists yet. This is left to #186