Transcrypt icon indicating copy to clipboard operation
Transcrypt copied to clipboard

dict.fromkeys is not a function

Open cslotterback opened this issue 4 years ago • 1 comments

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?

cslotterback avatar Jun 15 '21 20:06 cslotterback

Will be added in v3.9.4

JennaSys avatar Jul 28 '24 20:07 JennaSys