Skip to content

Commit

Permalink
RST tweak
Browse files Browse the repository at this point in the history
  • Loading branch information
caternuson committed Sep 28, 2020
1 parent 8e4f08a commit 4d4dbbc
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions docs/design_guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -448,18 +448,18 @@ struct.pack

Use `struct.pack_into` instead of `struct.pack`.

Use of MicroPython `const()`
Use of MicroPython ``const()``
--------------------------------------------------------------------------------
The MicroPython `const()` feature, as discussed in `this forum post
The MicroPython ``const()`` feature, as discussed in `this forum post
<https://forum.micropython.org/viewtopic.php?t=450>`_, and in `this issue thread
<https://github.com/micropython/micropython/issues/573>`_, provides some
optimizations that can be useful on smaller, memory constrained devices. However,
when using `const()`, keep in mind these general guide lines:
when using ``const()``, keep in mind these general guide lines:

- Always use via an import, ex: `from micropython import const`
- Always use via an import, ex: ``from micropython import const``
- Limit use to global (module level) variables only.
- If user will not need access to variable, prefix name with a leading
underscore, ex: `_SOME_CONST`.
underscore, ex: ``_SOME_CONST``.

Sensor properties and units
--------------------------------------------------------------------------------
Expand Down

0 comments on commit 4d4dbbc

Please sign in to comment.