File tree Expand file tree Collapse file tree 3 files changed +5
-166
lines changed Expand file tree Collapse file tree 3 files changed +5
-166
lines changed Original file line number Diff line number Diff line change @@ -54,4 +54,4 @@ the following libraries.
54
54
.. toctree ::
55
55
:maxdepth: 1
56
56
57
- micropython.rst
57
+ ../../shared-bindings/ micropython/index .rst
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1
1
"""Access and control MicroPython internals"""
2
2
3
- from typing import TypeVar
4
-
5
- T = TypeVar ("T" )
6
-
7
- def const (expr : T ) -> T :
3
+ def const [T ](expr : T ) -> T :
8
4
"""Used to declare that the expression is a constant so that the compiler
9
- can optimise it. The use of this function should be as follows:
5
+ can optimise it. The use of this function should be as follows::
10
6
11
7
from micropython import const
12
8
@@ -18,7 +14,7 @@ def const(expr: T) -> T:
18
14
begins with an underscore then it is hidden, it is not available as a global
19
15
variable, and does not take up any memory during execution.
20
16
21
- This const function is recognised directly by the MicroPython parser and is
22
- provided as part of the micropython module mainly so that scripts can be
17
+ This ` const` function is recognised directly by the MicroPython parser and is
18
+ provided as part of the :mod:` micropython` module mainly so that scripts can be
23
19
written which run under both CPython and MicroPython, by following the above
24
20
pattern."""
You can’t perform that action at this time.
0 commit comments