microbit-foundation / micropython-microbit-stubs

Type stubs for MicroPython for micro:bit to support the micro:bit Python Editor V3
https://python.microbit.org/
Other
3 stars 2 forks source link

Second parameter to sys.print_exception is unsupported on micro:bit #33

Closed microbit-matt-hillsdon closed 2 years ago

microbit-matt-hillsdon commented 2 years ago

Screenshot2022_04_27_122656

https://github.com/micropython/micropython/blob/1e2f0d2809c5431c9baf1d6f447162013f58baac/py/modsys.c#L123

Presumably because we don’t have MICROPY_PY_SYS_STDFILES set.

We should remove the second argument from the stubs. It would have originated from the upstream MicroPython docs as there are no micro:bit docs for the sys module.

Ideally MicroPython would error when passed an unsupported parameter, I'll see if others think this is worth reporting.