QUERY · ISSUE
'/' as a parameter of a function gives a syntax error
bug
If a python program takes / as the parameter of a function, micropython reports a SyntaxError. See the following case. This test case can work normally on CPython.
MicroPython_exampe.py
def run_in_thread(func, /, *args, **kwargs):
pass
The expected behavior:
CPython 3.9.0: work normally
The actual output:
Traceback (most recent call last):
File "/home/xxm/Desktop/MicroPython_exampe.py", line 55
SyntaxError: invalid syntax
Test Environment:
Unix port,
MicroPython v1.20.0-162-gd080d427e on 2023-06-08; linux [GCC 7.5.0] version
Ubuntu 18.04
CPython 3.9.0
CANDIDATE · ISSUE
function define syntax check
def foo(a, b=3, c):
print(a, b, c)
it's a syntax error in CPython: non-default argument follows default argument
can be compiled success in MP and run wrongly