-
-
Notifications
You must be signed in to change notification settings - Fork 216
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
problem with tuple+obj and list+obj expressions #888
Comments
This is a solution to deal with the issue with
|
Although the change in the previous comment solves the issue it may not be the best approach. The Python way would be to have type checking and return NotImplemented if incorrect type that would trigger
Tested Javascript changes on local Transcrypt cloned from current git repository. Tested with compiled Python code similar to first comment, verified that tuple and list functionality ( |
There is an apparent problem with
tuple + obj
andlist + obj
expressions. Rather than callobj.__radd__
, it seems thattuple.__add__
/list.__add__
are called. Similar problem occurs withtuple * obj
andlist * obj
. Problem appears to stem from the fact that tuple and list have__add__
and__mul__
methods that seem to take priority.python code:
console output:
env: Python3.9 venv with pip install Transcrypt
testing: Firefox version 133 in Linux
The text was updated successfully, but these errors were encountered: