Skip to content

Commit 492bf12

Browse files
committed
docs/library/index: Make single section for "micro-ified" modules.
Even the modules whose names don't start with "u" prefix are micro-ified anyway, i.e. provide only subset of CPython's functionality (and sometimes extensions to it). So, it doesn't make much sense to devide them by criteria of having/not having "u" prefix.
1 parent 678f3a1 commit 492bf12

1 file changed

Lines changed: 56 additions & 52 deletions

File tree

docs/library/index.rst

Lines changed: 56 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
MicroPython libraries
22
=====================
33

4+
The following standard Python libraries are built in to MicroPython.
5+
6+
For additional libraries, please download them from the `micropython-lib repository
7+
<https://github.com/micropython/micropython-lib>`_.
8+
49
MicroPython-specific libraries
510
------------------------------
611

@@ -15,49 +20,79 @@ the following libraries.
1520
network.rst
1621
uctypes.rst
1722

18-
Python standard libraries
19-
-------------------------
23+
Python standard libraries and micro-libraries
24+
---------------------------------------------
2025

21-
The following standard Python libraries are built in to MicroPython.
26+
The following standard Python libraries have been "micro-ified" to fit in with
27+
the philosophy of MicroPython. They provide the core functionality of that
28+
module and are intended to be a drop-in replacement for the standard Python
29+
library.
2230

23-
For additional libraries, please download them from the `micropython-lib repository
24-
<https://github.com/micropython/micropython-lib>`_.
31+
.. only:: not port_unix
32+
33+
The modules are available by their u-name, and also by their non-u-name. The
34+
non-u-name can be overridden by a file of that name in your package path.
35+
For example, ``import json`` will first search for a file ``json.py`` or
36+
directory ``json`` and load that package if it is found. If nothing is found,
37+
it will fallback to loading the built-in ``ujson`` module.
2538

2639
.. only:: port_unix
2740

2841
.. toctree::
2942
:maxdepth: 1
30-
43+
3144
cmath.rst
3245
gc.rst
3346
math.rst
3447
os.rst
48+
select.rst
3549
sys.rst
36-
time.rst
50+
ubinascii.rst
51+
uhashlib.rst
52+
uheapq.rst
53+
ujson.rst
54+
ure.rst
55+
usocket.rst
56+
ustruct.rst
57+
utime.rst
58+
uzlib.rst
3759

3860
.. only:: port_pyboard
3961

4062
.. toctree::
4163
:maxdepth: 1
42-
64+
4365
cmath.rst
4466
gc.rst
4567
math.rst
4668
os.rst
4769
select.rst
4870
sys.rst
49-
time.rst
71+
ubinascii.rst
72+
uhashlib.rst
73+
uheapq.rst
74+
ujson.rst
75+
ure.rst
76+
usocket.rst
77+
ustruct.rst
78+
utime.rst
79+
uzlib.rst
5080

5181
.. only:: port_wipy
5282

5383
.. toctree::
5484
:maxdepth: 1
55-
85+
5686
gc.rst
5787
os.rst
5888
select.rst
5989
sys.rst
60-
time.rst
90+
ubinascii.rst
91+
ujson.rst
92+
ure.rst
93+
usocket.rst
94+
ussl.rst
95+
utime.rst
6196

6297
.. only:: port_esp8266
6398

@@ -66,49 +101,18 @@ For additional libraries, please download them from the `micropython-lib reposit
66101

67102
gc.rst
68103
math.rst
104+
os.rst
69105
sys.rst
70-
time.rst
71-
72-
Python micro-libraries
73-
----------------------
74-
75-
The following standard Python libraries have been "micro-ified" to fit in with
76-
the philosophy of MicroPython. They provide the core functionality of that
77-
module and are intended to be a drop-in replacement for the standard Python
78-
library.
79-
80-
.. only:: not port_unix
81-
82-
The modules are available by their u-name, and also by their non-u-name. The
83-
non-u-name can be overridden by a file of that name in your package path.
84-
For example, ``import json`` will first search for a file ``json.py`` or
85-
directory ``json`` and load that package if it is found. If nothing is found,
86-
it will fallback to loading the built-in ``ujson`` module.
87-
88-
.. only:: port_unix or port_pyboard or port_esp8266
89-
90-
.. toctree::
91-
:maxdepth: 1
92-
93-
ubinascii.rst
94-
uhashlib.rst
95-
uheapq.rst
96-
ujson.rst
97-
ure.rst
98-
usocket.rst
99-
ustruct.rst
100-
uzlib.rst
101-
102-
.. only:: port_wipy
103-
104-
.. toctree::
105-
:maxdepth: 1
106+
ubinascii.rst
107+
uhashlib.rst
108+
uheapq.rst
109+
ujson.rst
110+
ure.rst
111+
usocket.rst
112+
ustruct.rst
113+
utime.rst
114+
uzlib.rst
106115

107-
ubinascii.rst
108-
ujson.rst
109-
ure.rst
110-
usocket.rst
111-
ussl.rst
112116

113117
.. only:: port_pyboard
114118

0 commit comments

Comments
 (0)