فهرست منبع

add feature support page

Oliver Fabel 1 سال پیش
والد
کامیت
79b2cf527a
4فایلهای تغییر یافته به همراه78 افزوده شده و 5 حذف شده
  1. 1 0
      Makefile
  2. 2 0
      docs/pages/changelog.rst
  3. 71 0
      docs/pages/features.md
  4. 4 5
      docs/pages/index.rst

+ 1 - 0
Makefile

@@ -16,6 +16,7 @@ clean:
 
 .PHONY: pages
 pages:
+	rm -rf ./dist/pages
 	source venv/bin/activate && sphinx-build docs/pages dist/pages
 
 .PHONY: publish

+ 2 - 0
docs/pages/changelog.rst

@@ -0,0 +1,2 @@
+.. include:: ../../CHANGELOG.md
+  :parser: myst_parser.sphinx_

+ 71 - 0
docs/pages/features.md

@@ -0,0 +1,71 @@
+# 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.
+* The `__file__` constant.
+* Import of external files from the SD card.
+* Read and write files from and to the SD card.
+* The `time` module.
+* The `random` module.
+* The `float` data type.
+* Support for [decorator](https://docs.python.org/3/glossary.html#term-decorator) functions.
+* The `setattr` function.
+* The `filter` function.
+* The `reversed` function.
+* The `min` and `max` function.
+* Module-level `__init__` imports.
+
+## Unsupported
+
+The following features are disabled and _not_ supported by the interpreter:
+
+* Finaliser calls in the garbage collector (e.g. `__del__`).
+* The `__doc__` constants.
+* Source code line numbers in exceptions.
+* Support for a [REPL](https://en.wikipedia.org/wiki/Read%E2%80%93eval%E2%80%93print_loop).
+* The `cmath` module.
+* The `complex` data type.
+* Support for multiple inheritance.
+* Module-level `__getattr__` support according to [PEP 562](https://peps.python.org/pep-0562/).
+* Support for the descriptors `__get__`, `__set__` and  `__delete__`.
+* Coroutines with `async` and `await` functions.
+* The `:=` assign expression.
+* Non-standard `.pend_throw()` method for generators.
+* Support for `bytes.hex` and `bytes.fromhex`.
+* Support for unicode characters.
+* The string functions `.center`, `.count`, `.partition`, `.rpartition` and `.splitlines`.
+* The `%` string formatting operator (use `.format` instead).
+* The `bytearray` data type.
+* The `memoryview` data type.
+* The `slice` object.
+* The `frozenset` object.
+* The `property` decorator.
+* The `range` function with `start`, `stop` and `step` attributes.
+* The `next` function with a second argument.
+* The `round` function with integers.
+* All special methods for user classes (e.g. `__imul__`).
+* The `enumerate` function.
+* The `compile` function.
+* Support for `eval`, `exec` and `execfile` functions.
+* The `NotImplemented` special constant.
+* The `input` function.
+* The `pow` function with 3 integer arguments.
+* The `help` function.
+* The `micropython` module.
+* The `array` module.
+* The `collections` module.
+* The `struct` module.
+* The `gc` module.
+* The `sys` module.
+* The `select` module.
+* The `json` module.
+
+This list of unsupported features is not set in stone. 
+If you miss support for one particular feature, feel free to [open an issue](https://github.com/ofabel/mp-flipper/issues) or make a pull request.

+ 4 - 5
docs/pages/index.rst

@@ -3,12 +3,9 @@
    :maxdepth: 2
 
    quickstart
-   installation
-   users-guide
-   best-practice
-   architecture
    reference
-   Changes </changes>
+   features
+   Changelog </changelog>
    License </license>
 
 MicroPython on Flipper Zero
@@ -33,6 +30,8 @@ Features
 * Access the Flipper's hardware: buttons, speaker, LED & screen light, ...
 * No custom firmware required, so no risk to brick your Flipper.
 
+A complete list can be found in the :doc:`features </features>` section.
+
 How to Start
 ------------