-
-
Notifications
You must be signed in to change notification settings - Fork 216
Non-literal list concatenation and sorting: TypeError: t.py_sort is not a function #679
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
have you tried t.js_sort() instead? |
@vkbsb no, thanks, but I fixed it with some after-processing on the Javascript by changing |
@darthglowball You may want to enabe operator overloading when compiling (using -o switch for global, or pragma('opov') for local). |
@fzzylogic something happens now, but in Firefox I get the incorrect result |
Even with the -o switch, you get a py_sort in the generated code:
That doesn't behave like a Python sort (see previous post). |
In the transcrypt runtime.js the sort function used is the javascript Even better would be to change Line:1972 and Line:1976 to use @darthglowball incidentally, |
related to #605 |
More precisely in
Output:
|
@AlexECX yes, Python |
Currently Transcrypts I believe the Transcrypt |
@AlexECX you're right about Chrome giving the incorrect result with |
This has been implemented in the dev_3.9.3 branch to be released in v3.9.3 |
Merged to master on PR #876 |
Hi,
sorting a non-literal concatenated list causes the error: TypeError: t.py_sort is not a function. While the lists are literals, the concatenation is done by variables and the plus operator.
The text was updated successfully, but these errors were encountered: