Skip to content

'/' as a parameter of a function gives a syntax error #11736

@xiaxinmeng

Description

@xiaxinmeng

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy