Features¶
Adding Python support to the Flipper Zero platform was only possible by rigorously sorting unnecessary language features. So here is a detailed list of all supported and unsupported Python language features.
Supported¶
The following features are enabled and supported by the interpreter:
Garbage collector is enabled.
Finaliser calls in the garbage collector (e.g.
__del__).The
__file__constant.Import of external files from the SD card.
Read and write files from and to the SD card.
The
timemodule.The
randommodule.The
loggingmodule.The
iomodule.The
floatdata type.The
%string formatting operator.The
.formatstring formatting function.Support for decorator functions.
The
setattrfunction.The
filterfunction.The
reversedfunction.The
minandmaxfunction.Module-level
__init__imports.Support for a REPL.
Unsupported¶
The following features are disabled and not supported by the interpreter:
The
__doc__constants.Source code line numbers in exceptions.
The
cmathmodule.The
complexdata type.Support for multiple inheritance.
Module-level
__getattr__support according to PEP 562.Support for the descriptors
__get__,__set__and__delete__.Coroutines with
asyncandawaitfunctions.The
:=assign expression.Non-standard
.pend_throw()method for generators.Support for
bytes.hexandbytes.fromhex.Support for unicode characters.
The string functions
.center,.count,.partition,.rpartitionand.splitlines.The
bytearraydata type.The
memoryviewdata type.The
sliceobject.The
frozensetobject.The
propertydecorator.The
nextfunction with a second argument.All special methods for user classes (e.g.
__imul__).The
enumeratefunction.The
compilefunction.Support for
eval,execandexecfilefunctions.The
NotImplementedspecial constant.The
inputfunction.The
powfunction with 3 integer arguments.The
helpfunction.The
micropythonmodule.The
arraymodule.The
collectionsmodule.The
structmodule.The
gcmodule.The
sysmodule.The
selectmodule.The
jsonmodule.
This list of unsupported features is not set in stone. If you miss support for one particular feature, feel free to open an issue or make a pull request.