|
|
|
|
|
by pansa2
2012 days ago
|
|
> MicroPython, as a language, is a complete reimplementation of Python But there are plenty of differences between MicroPython and CPython [0]. Many of them (listed under “Syntax”, “Core language” and “Builtin types”) relate to the language itself rather than the standard library. Not to mention that the baseline for those lists is CPython 3.4 - MicroPython is also missing most of the new features of CPython 3.5 - 3.9. [0] https://docs.micropython.org/en/latest/genrst/index.html |
|
Are there any differences there that you'd consider significant? They are generally quite minor and usually have workarounds. Typically a difference is only introduced when additional memory (either adding complexity to the parser or in runtime use) is the consequence of absolute compatibility. They all seem like a reasonable trade-off.
> Not to mention that the baseline for those lists is CPython 3.4 - MicroPython is also missing most of the new features of CPython 3.5 - 3.9.
The baseline was 3.4 during development but more modern features have continued to be added, particularly if they can be shown to be implemented with low memory use. For example there is solid asyncio support (based on 3.8 [0]), the assignment operator has been implemented and, care has been taken to ignore type annotations correctly. fstring support is _almost_ there too (it ought to make it in to the next release).
The development team listens to requests for new language features so please raise a ticket (or comment on an existing one [1], [2]) to help prioritise upcoming features.
[0] https://github.com/peterhinch/micropython-async/blob/master/...
[1] Python 3.5 support: https://github.com/micropython/micropython/issues/1329
[2] Python 3.6 support: https://github.com/micropython/micropython/issues/2415