Changes between Version 38 and Version 39 of j2p


Ignore:
Timestamp:
07/13/23 10:49:24 (16 months ago)
Author:
wouter
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • j2p

    v38 v39  
    5757This default translation can be overridden using custom translators.
    5858
    59 ==== built-in classes
    60 ||=java=||=python=||=remarks=||
    61 ||Class||type||
    62 ||System||sys||
     59==== Translated classes
     60The number of translated classes is too big to even list here. Please check the  [source:Utilities/browser/java2python/core/src/main/java/tudelft/utilities/j2p/t/java source code]
     61
    6362
    6463If function calls in python deliver a wrong object (not matching the above mapping), the translator has to inject additional code to convert it to the proper object. For example, {{{Map.getKeys()}}} in python would be {{{set(map.keys())}}} where the extra {{{set}}} converts the dict_keys into a proper set.
     64
     65=== Stream
     66Stream classes are currently not translated. It might be possible to translate them automatically but it looks pretty complex because the python way to deal with streams is list comprehension and the translation is quite far from straightforward.
    6567
    6668==== Inner classes