Page 1 of 1

micropython origins?

Posted: Fri Nov 20, 2020 7:34 pm
by miltmobley
I am curious what version of cpython the original micropython is based on.

And does current micropython track changes made to cpython since then?

I am interested in studying changes made to create micropython, but only in the py folder,
e.g. lexer/scanner/parser/bytecode interpreter.

Re: micropython origins?

Posted: Fri Nov 20, 2020 7:55 pm
by dhylands
The original Kickstarter for MicroPython can be found here: https://www.kickstarter.com/projects/21 ... ontrollers

It says that it follows the "Python 3.3 grammar and language semantics"

The very first commit was made to the repository in Oct, 2013.

This page: http://docs.micropython.org/en/latest/genrst/index.html says that if currently "implements Python 3.4 and some select features of Python 3.5".

Re: micropython origins?

Posted: Fri Nov 20, 2020 7:56 pm
by stijn
MicroPython was written completely from scratch so it is not based on CPython.

Re: micropython origins?

Posted: Sat Nov 21, 2020 10:27 am
by pythoncoder
dhylands wrote:
Fri Nov 20, 2020 7:55 pm
...
This page: http://docs.micropython.org/en/latest/genrst/index.html says that if currently "implements Python 3.4 and some select features of Python 3.5".
That ref is slightly out of date. MicroPython now includes some features from 3.8 including the "walrus operator" and elements of uasyncio.

Re: micropython origins?

Posted: Sat Nov 21, 2020 10:55 am
by mattyt
Although originally using 3.3 (then, later, 3.4) as a baseline, MicroPython now contains a mix of features from various Python releases. For example, v1.13 includes the assignment (walrus) operator, described in PEP 572 and introduced in Python 3.8. Generally, most features will be considered, the barrier to entry is to find a resource-efficient way to implement a feature with acceptable levels of compatibility with CPython.

It's also worth noting that there are a couple of issues discussing Python 3.5 and Python 3.6 support.

Finally, you might want to take a look at Damien talking about The Early Days of MicroPython last year on MicroPython's sixth birthday.