summaryrefslogtreecommitdiffstatshomepage
path: root/docs/reference
diff options
context:
space:
mode:
Diffstat (limited to 'docs/reference')
-rw-r--r--docs/reference/asm_thumb2_hints_tips.rst6
-rw-r--r--docs/reference/constrained.rst2
-rw-r--r--docs/reference/speed_python.rst8
3 files changed, 8 insertions, 8 deletions
diff --git a/docs/reference/asm_thumb2_hints_tips.rst b/docs/reference/asm_thumb2_hints_tips.rst
index 062a3c8448..361e44380b 100644
--- a/docs/reference/asm_thumb2_hints_tips.rst
+++ b/docs/reference/asm_thumb2_hints_tips.rst
@@ -3,7 +3,7 @@ Hints and tips
The following are some examples of the use of the inline assembler and some
information on how to work around its limitations. In this document the term
-"assembler function" refers to a function declared in Python with the
+"assembler function" refers to a function declared in Python with the
``@micropython.asm_thumb`` decorator, whereas "subroutine" refers to assembler
code called from within an assembler function.
@@ -106,8 +106,8 @@ function can return multiple values by assigning them to array elements.
Assembler functions have no means of determining the length of an array:
this will need to be passed to the function.
-This use of arrays can be extended to enable more than three arrays to be used.
-This is done using indirection: the ``uctypes`` module supports ``addressof()``
+This use of arrays can be extended to enable more than three arrays to be used.
+This is done using indirection: the ``uctypes`` module supports ``addressof()``
which will return the address of an array passed as its argument. Thus you can
populate an integer array with the addresses of other arrays:
diff --git a/docs/reference/constrained.rst b/docs/reference/constrained.rst
index 2a5f9d7fdb..816a20f9da 100644
--- a/docs/reference/constrained.rst
+++ b/docs/reference/constrained.rst
@@ -144,7 +144,7 @@ store constant data:
As in the string example, at runtime a reference to the arbitrarily large
integer is assigned to the variable ``bar``. That reference occupies a
-single machine word.
+single machine word.
It might be expected that tuples of integers could be employed for the purpose
of storing constant data with minimal RAM use. With the current compiler this
diff --git a/docs/reference/speed_python.rst b/docs/reference/speed_python.rst
index 85e956e8e6..834a53b0a7 100644
--- a/docs/reference/speed_python.rst
+++ b/docs/reference/speed_python.rst
@@ -36,7 +36,7 @@ Algorithms
~~~~~~~~~~
The most important aspect of designing any routine for performance is ensuring that
-the best algorithm is employed. This is a topic for textbooks rather than for a
+the best algorithm is employed. This is a topic for textbooks rather than for a
MicroPython guide but spectacular performance gains can sometimes be achieved
by adopting algorithms known for their efficiency.
@@ -210,7 +210,7 @@ no adaptation (but see below). It is invoked by means of a function decorator:
buf = self.linebuf # Cached object
# code
-There are certain limitations in the current implementation of the native code emitter.
+There are certain limitations in the current implementation of the native code emitter.
* Context managers are not supported (the ``with`` statement).
* Generators are not supported.
@@ -222,7 +222,7 @@ increase in compiled code size.
The Viper code emitter
----------------------
-The optimisations discussed above involve standards-compliant Python code. The
+The optimisations discussed above involve standards-compliant Python code. The
Viper code emitter is not fully compliant. It supports special Viper native data types
in pursuit of performance. Integer processing is non-compliant because it uses machine
words: arithmetic on 32 bit hardware is performed modulo 2**32.
@@ -237,7 +237,7 @@ bit manipulations. It is invoked using a decorator:
def foo(self, arg: int) -> int:
# code
-As the above fragment illustrates it is beneficial to use Python type hints to assist the Viper optimiser.
+As the above fragment illustrates it is beneficial to use Python type hints to assist the Viper optimiser.
Type hints provide information on the data types of arguments and of the return value; these
are a standard Python language feature formally defined here `PEP0484 <https://www.python.org/dev/peps/pep-0484/>`_.
Viper supports its own set of types namely ``int``, ``uint`` (unsigned integer), ``ptr``, ``ptr8``,