Transcrypt
Transcrypt copied to clipboard
dict.fromkeys is not a function
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 (arr2 [i [0]] > 1) { __accu0__.append (i [0]); } } return py_iter (__accu0__); }) ()));
Which when run throws
_orgTranscrypt__runtime__.dict.fromkeys is not a function TypeError: _orgTranscrypt__runtime__.dict.fromkeys is not a function
Which is understandable, as fromkeys is not a function in js. Perhaps support could be added?
Will be added in v3.9.4