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

No easy way to convert Python objects to java.lang.Object #1202

Open
mhsmith opened this issue Jul 6, 2024 · 0 comments
Open

No easy way to convert Python objects to java.lang.Object #1202

mhsmith opened this issue Jul 6, 2024 · 0 comments
Labels

Comments

@mhsmith
Copy link
Member

mhsmith commented Jul 6, 2024

This was a deliberate choice in p2j ("because allowing conversion to Object could cause excessive ambiguity in overload resolution"), but maybe we need to revisit that choice, because it makes it impossible to pass Python objects to methods that take Object-type arguments. Off the top of my head, even I can't come up with a workaround, so what chance does a user have?

This even applies to PyObject.fromJava(Object), and even if we provided a PyObject overload for it, the conversion functions actively try not to expose PyObject proxies within Python, instead returning the original Python object.

@mhsmith mhsmith added the bug label Jul 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant