| Age | Commit message (Collapse) | Author |
|
The user code should call micropython.alloc_emergency_exception_buf(size)
where size is the size of the buffer used to print the argument
passed to the exception.
With the test code from #732, and a call to
micropython.alloc_emergenncy_exception_buf(100) the following error is
now printed:
```python
>>> import heartbeat_irq
Uncaught exception in Timer(4) interrupt handler
Traceback (most recent call last):
File "0://heartbeat_irq.py", line 14, in heartbeat_cb
NameError: name 'led' is not defined
```
|
|
See discussion in issue #50.
|
|
This will allow roughly the same behavior as Python3 for non-ASCII strings,
for example, print("<phrase in non-Latin script>".split()) will print list
of words, not weird hex dump (like Python2 behaves). (Of course, that it
will print list of words, if there're "words" in that phrase at all, separated
by ASCII-compatible whitespace; that surely won't apply to every human
language in existence).
|
|
|
|
|
|
Should finish addressing issue #524.
|
|
Also, make sure that args to "*" format specifiers are bounds-checked
properly and don't lead for segfaults in case of mismatch.
|
|
|
|
This renames:
MICROPY_PY_FROZENSET -> MICROPY_PY_BUILTINS_FROZENSET
MICROPY_PY_PROPERTY -> MICROPY_PY_BUILTINS_PROPERTY
MICROPY_PY_SLICE -> MICROPY_PY_BUILTINS_SLICE
MICROPY_ENABLE_FLOAT -> MICROPY_PY_BUILTINS_FLOAT
See issue #35 for discussion.
|
|
Also unifies use of SMALL_INT_FITS macro across parser and runtime.
|
|
Addresses issue #627.
|
|
This removes need for some casts (at least, more than it adds need
for new casts!).
|
|
|
|
|
|
This means that complete slice operations are supported for lists (but not
for bytearray's and array.array's).
|
|
Older int-only encoding is not expressive enough to support arbitrary slice
assignment operations.
|
|
Addresses issue #598.
|
|
See issue #608 for justification.
|
|
|
|
Done in generalized manner, allowing any stream class to be specified as
working with bytes.
|
|
Likely there are other functions that should be renamed, but this is a
start.
|
|
Two things are handled here: allow to compare native subtypes of tuple,
e.g. namedtuple (TODO: should compare type too, currently compared
duck-typedly by content). Secondly, allow user sunclasses of tuples
(and its subtypes) be compared either. "Magic" I did previously in
objtype.c covers only one argument (lhs is many), so we're in trouble
when lhs is native type - there's no other option besides handling
rhs in special manner. Fortunately, this patch outlines approach with
fast path for native types.
|
|
|
|
Slice value to assign can be only a list so far too.
|
|
|
|
Tired of patching CPython stdlib for it.
|
|
|
|
|
|
Blanket wide to all .c and .h files. Some files originating from ST are
difficult to deal with (license wise) so it was left out of those.
Also merged modpyb.h, modos.h, modstm.h and modtime.h in stmhal/.
|
|
Well, it is bound to "detailed error reporting", but that's closest what we
have now without creating new entities.
|
|
This is ugly, just as expected.
|
|
|
|
Also, clear up freed slots in containers.
As a follow up to 32bef315be8e56ad2d7f69223fe7b9606893b6ab.
|
|
Implements 'def f(*, a)' and 'def f(*a, b)', but not default
keyword-only args, eg 'def f(*, a=1)'.
Partially addresses issue #524.
|
|
|
|
|
|
Closed over variables are now passed on the stack, instead of creating a
tuple and passing that. This way memory for the closed over variables
can be allocated within the closure object itself. See issue #510 for
background.
|
|
|
|
|
|
When querying an object that supports the buffer protocol, that object
must now return a typecode (as per binary.[ch]). This does not have to
be honoured by the caller, but can be useful for determining element
size.
|
|
Also make consistent use of MP_OBJ_NOT_SUPPORTED and MP_OBJ_NULL.
This helps a lot in debugging and understanding of function API.
|
|
mp_obj_t->subscr now does load/store/delete.
|
|
|
|
Addresses issue #487.
|
|
Enabled by MICROPY_ENABLE_PROPERTY.
|
|
Similar to similar support for lists.
|
|
Small fixes to get it compiling with ARMCC. I have no idea why
category_t was in the enum definition for qstrs...
|
|
|
|
|
|
Also convert mp_obj_is_integer to an inline function.
Overall this decreased code size (at least on 32-bit x86 machine).
|