|
1 | 1 | .. _micropython_lib: |
2 | 2 |
|
3 | | -CircuitPython libraries |
| 3 | +MicroPython libraries |
4 | 4 | ===================== |
5 | 5 |
|
6 | 6 | Python standard libraries and micro-libraries |
7 | 7 | --------------------------------------------- |
8 | 8 |
|
9 | | -These libraries are the same or are subsets or slight variants of the standard Python libraries. |
| 9 | +These libraries are inherited from MicroPython. |
| 10 | +They are similar to the standard Python libraries with the same name |
| 11 | +or with the "u" prefix dropped. |
| 12 | +They implement a subset of or a variant of the corresponding |
| 13 | +standard Python library. |
10 | 14 |
|
11 | | -MicroPython prefixed many of these libraries with ``u``. In CircuitPython, those |
12 | | -that are subsets or the same as the standard Python libraries have been or will be renamed |
13 | | -to their original names. |
14 | | -Our aspiration is that code written in CircuitPython |
15 | | -that uses Python standard libraries will be runnable on CPython without changes. |
16 | | -But we may fall short of this goal in some cases. |
| 15 | +.. warning:: |
17 | 16 |
|
18 | | -Some of the libraries below are not enabled on CircuitPython builds with |
| 17 | + Though these MicroPython-based libraries are available in CircuitPython, |
| 18 | + their functionality may change in the future, perhaps significantly. |
| 19 | + As CircuitPython continues to develop, new versions of these libraries will |
| 20 | + be created that are more compliant with the standard Python libraries. |
| 21 | + You may need to change your code later if you rely |
| 22 | + on any non-standard functionality they currently provide. |
| 23 | + |
| 24 | +CircuitPython's goal long-term goalis that code written in CircuitPython |
| 25 | +using Python standard libraries will be runnable on CPython without changes. |
| 26 | + |
| 27 | +Some libraries below are not enabled on CircuitPython builds with |
19 | 28 | limited flash memory, usually on non-Express builds: |
20 | 29 | ``uerrno``, ``ure``. |
21 | 30 |
|
@@ -51,17 +60,18 @@ Not all of these are enabled on all WiFi-capable ports. |
51 | 60 | Omitted functions in the ``string`` library |
52 | 61 | ------------------------------------------- |
53 | 62 |
|
54 | | -A few string operations are not enabled on CircuitPython builds with |
55 | | -limited flash memory, usually on non-Express builds: |
| 63 | +A few string operations are not enabled on CircuitPython |
| 64 | +M0 non-Express builds, due to limited flash memory: |
56 | 65 | ``string.center()``, ``string.partition()``, ``string.splitlines()``, |
57 | 66 | ``string.reversed()``. |
58 | 67 |
|
59 | 68 |
|
60 | 69 | CircuitPython/MicroPython-specific libraries |
61 | 70 | ------------------------------ |
62 | 71 |
|
63 | | -Functionality specific to the CircuitPython (MicroPython) implementation is available in |
64 | | -the following libraries. |
| 72 | +Functionality specific to the CircuitPython/MicroPython implementation is available in |
| 73 | +the following libraries. These libraries may change signficantly or be removed in future |
| 74 | +versions of CircuitPtyon. |
65 | 75 |
|
66 | 76 | .. toctree:: |
67 | 77 | :maxdepth: 1 |
|
0 commit comments