Transcrypt
Transcrypt copied to clipboard
Python 3.9 to JavaScript compiler - Lean, fast, open! -
When using type aliases in transcrypt 3.6.49, js code is produced for the statements. These then fail at runtime. For example, the following will compile with the '-dc -ds -n...
### Details **OS:** Windows 10 **Python Version:** 3.9.6 **Transcrypt version:** 3.9.0 ### Summary I'm trying to get my pure-Python project with no dependencies to be Transcrypt compatible, but ran into...
Monotonic clocks are the best practice time source for any code that cares about how much time has passed between moments. This looks like it would be trivial to add...
```python def Q(s, /): print(s) Q(3) ``` is translated as ```javascript export var Q=function(){__call__(print,null,s)} __call__(Q,null,3) ``` which generates an error because s is not bound to anything.
```python x = [] for i in range(5): x.append(lambda i=i: print(i)) for c in x: c() ``` python output: ``` 0 1 2 3 4 ``` javascript output: ``` undefined...
```python # main.py a = [3] print((*a, 7)) ``` `transcrypt -m main.py` ```javascript // [...] export var a=[3]; print(tuple([a, 7])) ``` which thus produces ([3], 7) and not (3, 7)!...
I am trying to write a web app that shares code between client and server. There are certain stubs that cost very little (less than 10 lines) but allow mypy...
The following python `list(dict.fromkeys(i[0] for i in arr1 if arr2[i[0]] > 1))` Transcribes to `list (dict.fromkeys ((function () { var __accu0__ = []; for (var i of arr1) { if...
Corrected some spelling errors and rearranged the section for the pragma "jsiter" to put it in the correct alphabetical order on the page.