Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Maps reserved Java keywords to Python built-in function/method call #827
Some built-in methods in Python has names that conflict with reserved keyword in Java. One example is Python's generator
The current approach is by renaming the method to something else in Java implementation and adding checks to convert the name during Attribute node traversal in
As you can see, it is not very 'scalable', plus it lacks mechanism to standardize naming convention for converted name.
I spoken with @freakboy3742 just now and he suggested to have a dictionary to store mappings of reserved Java syntax to standardized Python's call name so that the transpiler can refer to it during transpilation.
Closing this. This can be achieved by defining