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

overload in(x, o::Py) to call o.__contains__(x) #279

Closed
stevengj opened this issue Mar 3, 2023 · 2 comments
Closed

overload in(x, o::Py) to call o.__contains__(x) #279

stevengj opened this issue Mar 3, 2023 · 2 comments

Comments

@stevengj
Copy link
Member

stevengj commented Mar 3, 2023

I just noticed that PyCall was missing an overload of in for PyObject, and I figured you might want the same for Py.

@stevengj
Copy link
Member Author

stevengj commented Mar 3, 2023

There are a few other such methods that might be worth exposing as well: https://docs.python.org/3/library/operator.html

@cjdoris
Copy link
Collaborator

cjdoris commented Mar 3, 2023

Already got it thanks! 🙂

https://github.com/cjdoris/PythonCall.jl/blob/ffdac16d3092a59ee83c5d0f69245d34a4c3e4dc/src/Py.jl#L337

I think all those operators which have an equivalent in Base are already there. Let me know if you spot any I've missed.

@cjdoris cjdoris closed this as completed Mar 3, 2023
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

No branches or pull requests

2 participants