Transcrypt
Transcrypt copied to clipboard
Python 3.9 to JavaScript compiler - Lean, fast, open! -
I am currently getting this error when trying to utilize dataclasses.replace() > Uncaught TypeError: (0 , _dataclasses.py_replace) is not a function Is this because the method has not been implemented...
It does not allow dict(a=1, b=2) which I can live without, but it also does not allow dict(a, b=2) and dict(a, **b) which is unfortunate.
Python supports objects in map key, but js doesn't. The js map will end up having the string "[object Object]" as key instead. If implementing this has negative performance implications,...
I have put ``#__pragma__('nojsmod')`` in the beginning of the file but transcrypt still generates __mod__function calls instead of % operator.
Pretty much self-explanatory
Standard method str.splitlines is missing in transcrypt
``` Saving target code in: /Users/davidclass/sprintStart/src/python/__target__/org.transcrypt.__runtime__.js Saving minified target code in: /Users/davidclass/sprintStart/src/python/__target__/org.transcrypt.__runtime__.js Error while compiling (offending file last): File '/Users/davidclass/sprintStart/src/python/experiment.py', line 2, at import of: File 'imutils', line 23, namely:...
Example to reproduce: a.py: ```python def test1(): pass def test2(): pass ``` b.py: ```python from a import test1 ``` c.py: ```python from a import test1, test2 from b import *...
```python exported = 1 if exported: non_exported = 1 ``` results in: ```javascript export var exported = 1; if (exported) { var non_exported = 1; } ``` note absence of...
Python's isalpha() et al support unicode characters, but transcrypt only checks for latin letters. This fix should allow to do it quick and dirty without extra dependencies and not growing...