-
Notifications
You must be signed in to change notification settings - Fork 114
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
Exporting a method with a different name than its declaration #408
Comments
That is currently not possible. Can you elaborate a bit on why you would want to do that instead of declaring a method with the new name? |
I have a typing library in python that allows IntelliSense to function and I want to use snake_case because that is what you are supposed to use with methods. In Java you're supposed to use camelCase for method names. So the declaration in Java would be |
@RevolvingMadness if you want to map Java methods to Python for idiomatic reasons, you might be interested in a new GraalPy specific feature in the latest release: https://github.com/oracle/graalpython/blob/master/docs/user/Interoperability.md#interop-types This allows you to write some Python code to map methods for specific Java types |
Sorry, I confused myself, and this feature is actually only master so far and will be in the upcoming release. |
Let's say I have a Java class:
I want to access that
bar
method in python but with a different name. I swear a while ago I could do:But now the
name
field doesn't exist?So then in Python it would be called with
barMethod
instead ofbar
.The text was updated successfully, but these errors were encountered: