MicroPython differences from CPython¶
The operations listed in this section produce conflicting results in MicroPython when compared to standard Python. MicroPython implements Python 3.4 and some select features of Python 3.5.
- Core language
- f-strings don’t support concatenation with adjacent literals if the adjacent literals contain braces
- f-strings cannot support expressions that require parsing to resolve nested braces
- Raw f-strings are not supported
- f-strings don’t support the !r, !s, and !a conversions
- Special method __del__ not implemented for user-defined classes
- Method Resolution Order (MRO) is not compliant with CPython
- When inheriting from multiple classes super() only calls one class
- Calling super() getter property in subclass will return a property object, not the value
- Error messages for methods may display unexpected argument counts
- Function objects do not have the
- User-defined attributes for functions are not supported
- Context manager __exit__() not called in a generator which does not run to completion
- Local variables aren’t included in locals() result
- Code running in eval() function doesn’t have access to local variables
- __all__ is unsupported in __init__.py in MicroPython.
- __path__ attribute of a package has a different type (single string instead of list of strings) in MicroPython
- Failed to load modules are still registered as loaded
- MicroPython does’t support namespace packages split across filesystem.
- Builtin types