Changes between Version 151 and Version 152 of j2p
- Timestamp:
- 10/29/24 15:31:25 (4 weeks ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
j2p
v151 v152 313 313 * Different java classes, eg {{{Map}}} {{{AbstractMap}}} and {{{HashMap}}}, may translate to the same python class ({{{map}}}). This can be done because translation is only 1 way. 314 314 * Other classes, like PriorityQueue, have no equivalent python class, and use a special class to help the translation 315 * Some methods, return a 'second class citizen' which leads to compatibility issues later in the code. We may replace some of these calls with alternatives. For example, in python dict.keys() returns a slimmed-down version of "set", which fails if you try to call eg "remove". In this case we use Keys(dict)from the utilitiespy package as a replacement.315 * Some methods, return a 'second class citizen' which leads to compatibility issues later in the code. We may replace some of these calls with alternatives. For example, in python dict.keys() returns an object that somewhat resembles a set" but can't be used as such. In this case we use {{{Keys(dict)}}} from the utilitiespy package as a replacement. 316 316 * The imported libraries in python have a different name than those in java. If the python library name equals the name of some variable in your code, this will cause a runtime error, typically something like {{{local variable 'json' referenced before assignment}}}. We can not (yet?) detect these issues at compile time. To solve it, change the variable name in java. 317 317