<feed xmlns='http://www.w3.org/2005/Atom'>
<title>suspect-devices/circuitpython/py/obj.h, branch v1.9.4</title>
<subtitle>CircuitPython - a Python implementation for teaching coding with microcontrollers</subtitle>
<id>https://git.suspectdevices.com/suspect-devices/circuitpython/atom?h=v1.9.4</id>
<link rel='self' href='https://git.suspectdevices.com/suspect-devices/circuitpython/atom?h=v1.9.4'/>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/'/>
<updated>2018-05-01T13:25:18+00:00</updated>
<entry>
<title>py/obj.h: Fix math.e constant for nan-boxing builds.</title>
<updated>2018-05-01T13:25:18+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2018-05-01T13:25:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=6b4b6d388be338d36de01b01e25f6e324321750a'/>
<id>urn:sha1:6b4b6d388be338d36de01b01e25f6e324321750a</id>
<content type='text'>
Due to a typo, math.e was too small by around 6e-11.
</content>
</entry>
<entry>
<title>py/runtime: Check that keys in dicts passed as ** args are strings.</title>
<updated>2018-03-30T00:13:32+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2018-03-30T00:09:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=32807881954f106b9735de74fe984062a0815b81'/>
<id>urn:sha1:32807881954f106b9735de74fe984062a0815b81</id>
<content type='text'>
Prior to this patch the code would crash if a key in a ** dict was anything
other than a str or qstr.  This is because mp_setup_code_state() assumes
that keys in kwargs are qstrs (for efficiency).

Thanks to @jepler for finding the bug.
</content>
</entry>
<entry>
<title>py/obj.h: Move declaration of mp_obj_list_init to objlist.h.</title>
<updated>2018-03-13T03:03:15+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2018-03-13T03:03:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=e0bc438e4badb8f2d356479a3bee2b9c45fd69ca'/>
<id>urn:sha1:e0bc438e4badb8f2d356479a3bee2b9c45fd69ca</id>
<content type='text'>
If this function is used then objlist.h is already included to get the
definition of mp_obj_list_t.
</content>
</entry>
<entry>
<title>py/obj.h: Clean up by removing commented-out inline versions of macros.</title>
<updated>2018-03-13T03:01:55+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2018-03-13T03:01:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=9f811e9096819230905a5eb47812934531005403'/>
<id>urn:sha1:9f811e9096819230905a5eb47812934531005403</id>
<content type='text'>
</content>
</entry>
<entry>
<title>py/objdeque: Implement ucollections.deque type with fixed size.</title>
<updated>2018-02-21T11:39:25+00:00</updated>
<author>
<name>Paul Sokolovsky</name>
<email>pfalcon@users.sourceforge.net</email>
</author>
<published>2018-02-05T22:06:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=970eedce8f37af46cb2b67fa0e91d76c82057541'/>
<id>urn:sha1:970eedce8f37af46cb2b67fa0e91d76c82057541</id>
<content type='text'>
So far, implements just append() and popleft() methods, required for
a normal queue. Constructor doesn't accept an arbitarry sequence to
initialize from (am empty deque is always created), so an empty tuple
must be passed as such. Only fixed-size deques are supported, so 2nd
argument (size) is required.

There's also an extension to CPython - if True is passed as 3rd argument,
append(), instead of silently overwriting the oldest item on queue
overflow, will throw IndexError. This behavior is desired in many
cases, where queues should store information reliably, instead of
silently losing some items.
</content>
</entry>
<entry>
<title>py/objexcept: Remove long-obsolete mp_const_MemoryError_obj.</title>
<updated>2018-02-15T05:50:02+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2018-02-15T05:50:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=73d1d20b46dda54340ad2819b865f47ca25f4850'/>
<id>urn:sha1:73d1d20b46dda54340ad2819b865f47ca25f4850</id>
<content type='text'>
This constant exception instance was once used by m_malloc_fail() to raise
a MemoryError without allocating memory, but it was made obsolete long ago
by 3556e45711c3b7ec712748d013e678d035185bdd.  The functionality is now
replaced by the use of mp_emergency_exception_obj which lives in the global
uPy state, and which can handle any exception type, not just MemoryError.
</content>
</entry>
<entry>
<title>py: Extend nan-boxing config to have 47-bit small integers.</title>
<updated>2017-12-11T11:39:12+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2017-12-11T11:39:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=2759bec8587b0c0b7da1fa3a013e4f1b1530ad27'/>
<id>urn:sha1:2759bec8587b0c0b7da1fa3a013e4f1b1530ad27</id>
<content type='text'>
The nan-boxing representation has an extra 16-bits of space to store
small-int values, and making use of it allows to create and manipulate full
32-bit positive integers (ie up to 0xffffffff) without using the heap.
</content>
</entry>
<entry>
<title>py/objstr: Remove "make_qstr_if_not_already" arg from mp_obj_new_str.</title>
<updated>2017-11-16T02:17:51+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2017-11-16T02:17:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=4601759bf59e16b860a3f082e9aa4ea78356bf92'/>
<id>urn:sha1:4601759bf59e16b860a3f082e9aa4ea78356bf92</id>
<content type='text'>
This patch simplifies the str creation API to favour the common case of
creating a str object that is not forced to be interned.  To force
interning of a new str the new mp_obj_new_str_via_qstr function is added,
and should only be used if warranted.

Apart from simplifying the mp_obj_new_str function (and making it have the
same signature as mp_obj_new_bytes), this patch also reduces code size by a
bit (-16 bytes for bare-arm and roughly -40 bytes on the bare-metal archs).
</content>
</entry>
<entry>
<title>py/obj: Remove declaration for mp_obj_new_none(), it's never defined.</title>
<updated>2017-09-04T13:35:46+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2017-09-04T13:35:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=77a48e8cd493c0b0e0ca2d2ad58a110a23c6a232'/>
<id>urn:sha1:77a48e8cd493c0b0e0ca2d2ad58a110a23c6a232</id>
<content type='text'>
</content>
</entry>
<entry>
<title>py/objfloat: Fix binary ops with incompatible objects.</title>
<updated>2017-09-02T20:05:24+00:00</updated>
<author>
<name>Paul Sokolovsky</name>
<email>pfalcon@users.sourceforge.net</email>
</author>
<published>2017-09-02T18:19:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=9950865c39044e9fef295d0676af7c5fd55289ea'/>
<id>urn:sha1:9950865c39044e9fef295d0676af7c5fd55289ea</id>
<content type='text'>
These are now returned as "operation not supported" instead of raising
TypeError. In particular, this fixes equality for float vs incompatible
types, which now properly results in False instead of exception. This
also paves the road to support reverse operation (e.g. __radd__) with
float objects.

This is achieved by introducing mp_obj_get_float_maybe(), similar to
existing mp_obj_get_int_maybe().
</content>
</entry>
</feed>
