From c9bb9250db9579cce1772cff9cf69c8d17031a9d Mon Sep 17 00:00:00 2001 From: Angus Gratton Date: Wed, 1 Apr 2026 11:42:50 +1100 Subject: [PATCH] docs/develop: Link to module docs, remove extraneous example code. Small cleanup. This work was funded through GitHub Sponsors. Signed-off-by: Angus Gratton --- docs/develop/library.rst | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/docs/develop/library.rst b/docs/develop/library.rst index 830211d81c..6ff9bfe023 100644 --- a/docs/develop/library.rst +++ b/docs/develop/library.rst @@ -26,15 +26,9 @@ Implementing a core module -------------------------- Like CPython, MicroPython has core builtin modules that can be accessed through import statements. -An example is the ``gc`` module discussed in :ref:`memorymanagement`. +An example is the :mod:`gc` module discussed in :ref:`memorymanagement`. -.. code-block:: bash - - >>> import gc - >>> gc.enable() - >>> - -MicroPython has several other builtin standard/core modules like ``io``, ``array`` etc. +MicroPython has several other builtin standard/core modules like :mod:`io`, :mod:`array`, etc. Adding a new core module involves several modifications. First, create the ``C`` file in the ``py/`` directory. In this example we are adding a