diff options
author | Jim Mussared <jim.mussared@gmail.com> | 2021-08-12 13:59:29 +1000 |
---|---|---|
committer | Damien George <damien@micropython.org> | 2021-08-13 22:53:29 +1000 |
commit | c737cde9472741337be0c0a66e8e99695c6a9b14 (patch) | |
tree | 1d2d5a3d9b0580cc2d0a8abacbec98a55fb3d791 /docs/library/index.rst | |
parent | 218606351c6f9688a3f90dad791bcb2109adcf1b (diff) | |
download | micropython-c737cde9472741337be0c0a66e8e99695c6a9b14.tar.gz micropython-c737cde9472741337be0c0a66e8e99695c6a9b14.zip |
docs: Replace ufoo with foo in all docs.
Anywhere a module is mentioned, use its "non-u" name for consistency.
The "import module" vs "import umodule" is something of a FAQ, and this
commit intends to help clear that up. As a first approximation MicroPython
is Python, and so imports should work the same as Python and use the same
name, to a first approximation. The u-version of a module is a detail that
can be learned later on, when the user wants to understand more and have
finer control over importing.
Existing Python code should just work, as much as it is possible to do that
within the constraints of embedded systems, and the MicroPython
documentation should match the idiomatic way to write Python code.
With universal weak links for modules (via MICROPY_MODULE_WEAK_LINKS) users
can consistently use "import foo" across all ports (with the exception of
the minimal ports). And the ability to override/extend via "foo.py"
continues to work well.
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
Diffstat (limited to 'docs/library/index.rst')
-rw-r--r-- | docs/library/index.rst | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/docs/library/index.rst b/docs/library/index.rst index 638941fa5e..9af4fec056 100644 --- a/docs/library/index.rst +++ b/docs/library/index.rst @@ -56,7 +56,7 @@ The following standard Python libraries have been "micro-ified" to fit in with the philosophy of MicroPython. They provide the core functionality of that module and are intended to be a drop-in replacement for the standard Python library. Some modules below use a standard Python name, but prefixed with "u", -e.g. ``ujson`` instead of ``json``. This is to signify that such a module is +e.g. ``json`` instead of ``json``. This is to signify that such a module is micro-library, i.e. implements only a subset of CPython module functionality. By naming them differently, a user has a choice to write a Python-level module to extend functionality for better compatibility with CPython (indeed, this is @@ -68,7 +68,7 @@ are available both by their u-name, and also by their non-u-name. The non-u-name can be overridden by a file of that name in your library path (``sys.path``). For example, ``import json`` will first search for a file ``json.py`` (or package directory ``json``) and load that module if it is found. If nothing is found, -it will fallback to loading the built-in ``ujson`` module. +it will fallback to loading the built-in ``json`` module. .. toctree:: :maxdepth: 1 |