MicroPython doesn't support alternative syntax to create a tuple outta comprehension #1957
Open
3 tasks done
Labels
3rd party
Errors coming from foreign projects we either enable or rely on
needs-triage
Issue needs triage
type: bug
Something isn't working
Checklist
What happened?
In the file "mpy.py" @ setup() I'm creating a tuple from a generator comprehension:
balls = tuple( Ball(p) for _ in BALLS )
https://PyScript.com/@gotoloop/bouncing-colorful-balls
However if I change that to
balls = *( Ball(p) for _ in BALLS ),
it fails on μPython:https://PyScript.com/@gotoloop/bouncing-colorful-balls/v4
But if I swap it to Pyodide in "mpy.html" it works as expected w/ that alt. syntax:
<script type=py src=mpy.py config=mpy.toml></script>
https://PyScript.com/@gotoloop/bouncing-colorful-balls/v5
Of course it's not a big deal; but it saves 3 characters to fit everything in 80 cols.
What browsers are you seeing the problem on? (if applicable)
Firefox, Chrome, Other
Console info
Additional Context
No response
The text was updated successfully, but these errors were encountered: