<feed xmlns='http://www.w3.org/2005/Atom'>
<title>suspect-devices/circuitpython/py, branch v1.4.3</title>
<subtitle>CircuitPython - a Python implementation for teaching coding with microcontrollers</subtitle>
<id>https://git.suspectdevices.com/suspect-devices/circuitpython/atom?h=v1.4.3</id>
<link rel='self' href='https://git.suspectdevices.com/suspect-devices/circuitpython/atom?h=v1.4.3'/>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/'/>
<updated>2015-05-13T22:10:15+00:00</updated>
<entry>
<title>py: Fix printing of complex number when imaginary part is nan</title>
<updated>2015-05-13T22:10:15+00:00</updated>
<author>
<name>stijn</name>
<email>stinos@zoho.com</email>
</author>
<published>2015-05-13T19:35:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=709955b601a0b7de7a85e91d97846660979904a7'/>
<id>urn:sha1:709955b601a0b7de7a85e91d97846660979904a7</id>
<content type='text'>
</content>
</entry>
<entry>
<title>py: Add mp_obj_get_int_truncated and use it where appropriate.</title>
<updated>2015-05-12T22:05:53+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2015-05-12T22:05:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=c50772d19fe2804a6d0258f89dd9967d3b516fd3'/>
<id>urn:sha1:c50772d19fe2804a6d0258f89dd9967d3b516fd3</id>
<content type='text'>
mp_obj_get_int_truncated will raise a TypeError if the argument is not
an integral type.  Use mp_obj_int_get_truncated only when you know the
argument is a small or big int.
</content>
</entry>
<entry>
<title>py: Convert hash API to use MP_UNARY_OP_HASH instead of ad-hoc function.</title>
<updated>2015-05-12T21:46:02+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2015-05-11T12:25:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=c2a4e4effc81d8ab21bb014e34355643e5ca0da2'/>
<id>urn:sha1:c2a4e4effc81d8ab21bb014e34355643e5ca0da2</id>
<content type='text'>
Hashing is now done using mp_unary_op function with MP_UNARY_OP_HASH as
the operator argument.  Hashing for int, str and bytes still go via
fast-path in mp_unary_op since they are the most common objects which
need to be hashed.

This lead to quite a bit of code cleanup, and should be more efficient
if anything.  It saves 176 bytes code space on Thumb2, and 360 bytes on
x86.

The only loss is that the error message "unhashable type" is now the
more generic "unsupported type for __hash__".
</content>
</entry>
<entry>
<title>vm: Properly handle StopIteration raised in user instance iterator.</title>
<updated>2015-05-11T22:57:42+00:00</updated>
<author>
<name>Paul Sokolovsky</name>
<email>pfalcon@users.sourceforge.net</email>
</author>
<published>2015-05-10T23:59:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=6738c1dded8e436686f85008ec0a4fc47406ab7a'/>
<id>urn:sha1:6738c1dded8e436686f85008ec0a4fc47406ab7a</id>
<content type='text'>
I.e. in bytecode Python functions.
</content>
</entry>
<entry>
<title>objgenerator: Can optimize StopIteration to STOP_ITERATION only if arg is None.</title>
<updated>2015-05-11T22:57:42+00:00</updated>
<author>
<name>Paul Sokolovsky</name>
<email>pfalcon@users.sourceforge.net</email>
</author>
<published>2015-05-10T23:59:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=d5e629ad0edf2c2b91f1964eb54c91fd6f6fc9d0'/>
<id>urn:sha1:d5e629ad0edf2c2b91f1964eb54c91fd6f6fc9d0</id>
<content type='text'>
Unfortunately, MP_OBJ_STOP_ITERATION doesn't have means to pass an associated
value, so we can't optimize StopIteration exception with (non-None) argument
to MP_OBJ_STOP_ITERATION.
</content>
</entry>
<entry>
<title>objgenerator: If generator yielded STOP_ITERATION value, it's stopped.</title>
<updated>2015-05-11T22:57:42+00:00</updated>
<author>
<name>Paul Sokolovsky</name>
<email>pfalcon@users.sourceforge.net</email>
</author>
<published>2015-05-10T23:59:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=aa9dbb1b033a8163e07fcf5763fc20146354cc48'/>
<id>urn:sha1:aa9dbb1b033a8163e07fcf5763fc20146354cc48</id>
<content type='text'>
MP_OBJ_STOP_ITERATION is equivalent of raising StopIteration, except
mp_vm_return_kind_t for it is "yield".
</content>
</entry>
<entry>
<title>vm: Null pointer test when checking for StopIteration optimizations.</title>
<updated>2015-05-10T14:20:46+00:00</updated>
<author>
<name>Paul Sokolovsky</name>
<email>pfalcon@users.sourceforge.net</email>
</author>
<published>2015-05-10T14:18:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=a7c02c4538bb2b986efb1999e00da4d76345767d'/>
<id>urn:sha1:a7c02c4538bb2b986efb1999e00da4d76345767d</id>
<content type='text'>
When generator raises exception, it is automatically terminated (by setting
its code_state.ip to 0), which interferes with this check.

Triggered in particular by CPython's test_pep380.py.
</content>
</entry>
<entry>
<title>runtime: Add TODO for mp_resume() on handling .close().</title>
<updated>2015-05-09T23:39:45+00:00</updated>
<author>
<name>Paul Sokolovsky</name>
<email>pfalcon@users.sourceforge.net</email>
</author>
<published>2015-05-09T23:39:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=4a60cac9162f8f2aa25a2de4025493d38113ae54'/>
<id>urn:sha1:4a60cac9162f8f2aa25a2de4025493d38113ae54</id>
<content type='text'>
Exceptions in .close() should be ignored (dumped to sys.stderr, not
propagated), but in uPy, they are propagated. Fix would require
nlr-wrapping .close() call, which is expensive. Bu on the other hand,
.close() is not called often, so maybe that's not too bad (depends,
if it's finally called and that causes stack overflow, there's nothing
good in that). And yet on another hand, .close() can be implemented to
catch exceptions on its side, and that should be the right choice.
</content>
</entry>
<entry>
<title>py: iternext() may not return MP_OBJ_NULL, only MP_OBJ_STOP_ITERATION.</title>
<updated>2015-05-09T21:41:49+00:00</updated>
<author>
<name>Paul Sokolovsky</name>
<email>pfalcon@users.sourceforge.net</email>
</author>
<published>2015-05-09T21:41:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=4ed7b7f751b161420e6979927fd0756467a10cb7'/>
<id>urn:sha1:4ed7b7f751b161420e6979927fd0756467a10cb7</id>
<content type='text'>
Testing for incorrect value led to premature termination of generator
containing yield from for such iterator (e.g. "yield from [1, 2]").
</content>
</entry>
<entry>
<title>emitnative: Revamp ARM codegen compile after full-arg support refactors.</title>
<updated>2015-05-08T21:35:34+00:00</updated>
<author>
<name>Paul Sokolovsky</name>
<email>pfalcon@users.sourceforge.net</email>
</author>
<published>2015-05-07T20:08:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=351424e71900d8d03d1a98a3fe8d2fa6561c0da8'/>
<id>urn:sha1:351424e71900d8d03d1a98a3fe8d2fa6561c0da8</id>
<content type='text'>
The code was apparently broken after 9988618e0e0f5c319e31b135d993e22efb593093
"py: Implement full func arg passing for native emitter.". This attempts to
propagate those changes to ARM emitter.
</content>
</entry>
</feed>
