The idea is to allow to define a kind of "macros" for repeatitive text,
so all occurrances can be updated in one place. Unfortunately, RST doesn't
support replacements with arguments, which limits usefulness of them and
should be taken into account.
We have enough terms or references throughout the docs which may be not
immediately clear or have some important nuances. Referencing terms in
gloassary is the best way to deal with that.
The old intro talked about "differences", but there were hardly any
sections describing differences, mostly MicroPython specific features.
On the other hand, we now have real "differences" chapter, though it's
mostly concerned with stdlib differences.
So, try to avoid confusion by changing wording and linking to the other
chapters and contrasting them with what is described in "MicroPython
language".
Prior to this patch there were 2 paths for creating the namedtuple, one for
when no keyword args were passed, and one when there were keyword args.
And alloca was used in the keyword-arg path to temporarily create the array
of elements for the namedtuple, which would then be copied to a
heap-allocated object (the namedtuple itself).
This patch simplifies the code by combining the no-keyword and keyword
paths, and removing the need for the alloca by constructing the namedtuple
on the heap before populating it.
Heap usage in unchanged, stack usage is reduced, use of alloca is removed,
and code size is not increased and is actually reduced by between 20-30
bytes for most ports.
By default the firmware is built with single-precision floating point.
To build a particular board using double precision instead, put the
following line in the mpconfigboard.mk file:
FLOAT_IMPL = double
The while-loop that calls chop_component will guarantee that level==-1 at
the end of the loop. Hence the code following it is unnecessary.
The check for p==this_name will catch imports that are beyond the
top-level, and also covers the case of new_mod_q==MP_QSTR_ (equivalent to
new_mod_l==0) so that check is removed.
There is also a new check at the start for level>=0 to guard against
__import__ being called with bad level values.
Previously, only "selected chapters" were shown in left-pane ToC (of
Read The Docs theme). These chapters were selected out of order. The
rest of chapters were hidden beyond "Documentation Contents" pseudo-
chapter. This arguably led only to confusion, as many people probably
never tried to open that pseudo-chapter, and those who did, were
confused. Such organization is even worse for PDF output, causing
chapters go in mix-mashed order.
So, instead move to single clean ToC. This will allow readers of HTML
to have access to any doc content at their fingertips (and straight
before their eyes), and will allow to finally have clean PDF docs.
A previous version of the 1-wire driver (which was recently replaced by the
current one) had this behaviour and it allows to create a 1-wire bus
without any external pull-up resistors.
And and FLASH_FS, and use "K" values instead of hex numbers for lengths.
The increase of FLASH_TEXT is to allow more frozen bytecode for a
particular user's project. It's not used for anything else.
Move hardware-specific optimizations to the very end of document, and
add visible note that it gives an example for Pyboard. Remove references
to specific hardware technologies, so the doc can be more naturally
used across ports. Various markup updates to adhere to the latest
docs conventions.
This causes `symbol` syntax to be equivalent to :any:`symbol`, which is
in turn the easiest way to cross-reference an arbitrary symbol in the
docs:
http://www.sphinx-doc.org/en/stable/markup/inline.html#role-any
:any: requires at least Sphinx 1.3 (for reference, Ubuntu 16.03 ships
with 1.3.6, the latest 1.6.3).
Any many of our docs, `symbol` is misused to specify arguments to
functions, etc. Refactoring that is in progress. (CODECONVENTIONS
already specify proper syntax for both arguments and xrefs, based
on CPython conventions).