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

"contains" method for Object "in" operations added #188

Merged
merged 7 commits into from
Nov 24, 2023
Merged

Conversation

philippedistributive
Copy link
Collaborator

@philippedistributive philippedistributive commented Nov 23, 2023

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

@philippedistributive
Copy link
Collaborator Author

Need to resolve conflict and failing test

Copy link
Collaborator

@zollqir zollqir left a 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

Comment on lines 131 to 132
pm.eval("let obj = {'c':5}")
a = pm.eval('obj')
Copy link
Collaborator

@zollqir zollqir Nov 24, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
pm.eval("let obj = {'c':5}")
a = pm.eval('obj')
a = pm.eval("({'c':5})")

Copy link
Collaborator

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.

Comment on lines 136 to 137
pm.eval("let obj1 = {'c':5}")
a = pm.eval('obj1')
Copy link
Collaborator

@zollqir zollqir Nov 24, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
pm.eval("let obj1 = {'c':5}")
a = pm.eval('obj1')
a = pm.eval("({'c':5})")

Comment on lines 141 to 142
pm.eval("let obj2 = {'c':5}")
a = pm.eval('obj2')
Copy link
Collaborator

@zollqir zollqir Nov 24, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
pm.eval("let obj2 = {'c':5}")
a = pm.eval('obj2')
pm.eval("({'c':5})")

Copy link
Collaborator

@zollqir zollqir left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@zollqir zollqir merged commit 9080ed2 into main Nov 24, 2023
24 checks passed
@zollqir zollqir deleted the philippe/fix/187 branch November 24, 2023 20:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants