<feed xmlns='http://www.w3.org/2005/Atom'>
<title>suspect-devices/circuitpython/py/objtype.c, branch v1.9.3</title>
<subtitle>CircuitPython - a Python implementation for teaching coding with microcontrollers</subtitle>
<id>https://git.suspectdevices.com/suspect-devices/circuitpython/atom?h=v1.9.3</id>
<link rel='self' href='https://git.suspectdevices.com/suspect-devices/circuitpython/atom?h=v1.9.3'/>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/'/>
<updated>2017-10-27T19:29:15+00:00</updated>
<entry>
<title>py/objtype: Introduce MICROPY_PY_ALL_INPLACE_SPECIAL_METHODS.</title>
<updated>2017-10-27T19:29:15+00:00</updated>
<author>
<name>Paul Sokolovsky</name>
<email>pfalcon@users.sourceforge.net</email>
</author>
<published>2017-10-27T19:29:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=0e80f345f88c5db7c2353a5a9d29ed08b0af42f4'/>
<id>urn:sha1:0e80f345f88c5db7c2353a5a9d29ed08b0af42f4</id>
<content type='text'>
This allows to configure support for inplace special methods separately,
similar to "normal" and reverse special methods. This is useful, because
inplace methods are "the most optional" ones, for example, if inplace
methods aren't defined, the operation will be executed using normal
methods instead.

As a caveat, __iadd__ and __isub__ are implemented even if
MICROPY_PY_ALL_INPLACE_SPECIAL_METHODS isn't defined. This is similar
to the state of affairs before binary operations refactor, and allows
to run existing tests even if MICROPY_PY_ALL_INPLACE_SPECIAL_METHODS
isn't defined.
</content>
</entry>
<entry>
<title>py/objtype: Define all special methods if requested.</title>
<updated>2017-10-27T17:06:35+00:00</updated>
<author>
<name>Paul Sokolovsky</name>
<email>pfalcon@users.sourceforge.net</email>
</author>
<published>2017-10-21T10:55:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=9b9dbc58155209e07ab7b9d63d63e5e24db5950c'/>
<id>urn:sha1:9b9dbc58155209e07ab7b9d63d63e5e24db5950c</id>
<content type='text'>
If MICROPY_PY_ALL_SPECIAL_METHODS is defined, actually define all special
methods (still subject to gating by e.g. MICROPY_PY_REVERSE_SPECIAL_METHODS).

This adds quite a number of qstr's, so should be used sparingly.
</content>
</entry>
<entry>
<title>py/objtype: Fit qstrs for special methods in byte type.</title>
<updated>2017-10-21T08:06:32+00:00</updated>
<author>
<name>Paul Sokolovsky</name>
<email>pfalcon@users.sourceforge.net</email>
</author>
<published>2017-10-21T08:06:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=9956fd0710c3866b9df37857c9aa62b8bb681403'/>
<id>urn:sha1:9956fd0710c3866b9df37857c9aa62b8bb681403</id>
<content type='text'>
Update makeqstrdata.py to sort strings starting with "__" to the beginning
of qstr list, so they get low qstr id's, guaranteedly fitting in 8 bits.
Then use this property to further compact op_id =&gt; qstr mapping arrays.
</content>
</entry>
<entry>
<title>py/objtype: Use CPython compatible method name for sizeof.</title>
<updated>2017-10-19T09:44:53+00:00</updated>
<author>
<name>Paul Sokolovsky</name>
<email>pfalcon@users.sourceforge.net</email>
</author>
<published>2017-10-19T09:40:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=f2baa9ec245a66c4cd7d990e39a4af3f6fab1cb7'/>
<id>urn:sha1:f2baa9ec245a66c4cd7d990e39a4af3f6fab1cb7</id>
<content type='text'>
Per https://docs.python.org/3/library/sys.html#sys.getsizeof:

getsizeof() calls the object’s __sizeof__ method. Previously, "getsizeof"
was used mostly to save on new qstr, as we don't really support calling
this method on arbitrary objects (so it was used only for reporting).
However, normalize it all now.
</content>
</entry>
<entry>
<title>py/objtype: Clean up unary- and binary-op enum-to-qstr mapping tables.</title>
<updated>2017-10-04T23:49:44+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2017-10-04T23:47:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=36f7952f764aea782e0223948fabae36abf3ec63'/>
<id>urn:sha1:36f7952f764aea782e0223948fabae36abf3ec63</id>
<content type='text'>
</content>
</entry>
<entry>
<title>all: Remove inclusion of internal py header files.</title>
<updated>2017-10-04T01:37:50+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2017-10-04T01:37:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=a3dc1b1957d2c96d7c60c2c629c95077b03488a1'/>
<id>urn:sha1:a3dc1b1957d2c96d7c60c2c629c95077b03488a1</id>
<content type='text'>
Header files that are considered internal to the py core and should not
normally be included directly are:
    py/nlr.h - internal nlr configuration and declarations
    py/bc0.h - contains bytecode macro definitions
    py/runtime0.h - contains basic runtime enums

Instead, the top-level header files to include are one of:
    py/obj.h - includes runtime0.h and defines everything to use the
        mp_obj_t type
    py/runtime.h - includes mpstate.h and hence nlr.h, obj.h, runtime0.h,
        and defines everything to use the general runtime support functions

Additional, specific headers (eg py/objlist.h) can be included if needed.
</content>
</entry>
<entry>
<title>py/objtype: Change type of enum-to-qstr table to uint16_t to save space.</title>
<updated>2017-10-04T00:31:05+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2017-10-04T00:31:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=6c82cfc089466f0b3f4b61c81baee1cabece1eaa'/>
<id>urn:sha1:6c82cfc089466f0b3f4b61c81baee1cabece1eaa</id>
<content type='text'>
Qstr values fit in 16-bits (and this fact is used elsewhere in the code) so
no need to use more than that for the large lookup tables.  The compiler
will anyway give a warning if the qstr values don't fit in 16 bits.  Saves
around 80 bytes of code space for Thumb2 archs.
</content>
</entry>
<entry>
<title>py/runtime: Implement dispatch for "reverse op" special methods.</title>
<updated>2017-09-10T14:05:57+00:00</updated>
<author>
<name>Paul Sokolovsky</name>
<email>pfalcon@users.sourceforge.net</email>
</author>
<published>2017-09-10T14:05:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=eb84a830df62813f5af7f0144fc77444bf18f3a8'/>
<id>urn:sha1:eb84a830df62813f5af7f0144fc77444bf18f3a8</id>
<content type='text'>
If, for class X, X.__add__(Y) doesn't exist (or returns NotImplemented),
try Y.__radd__(X) instead.

This patch could be simpler, but requires undoing operand swap and
operation switch to get non-confusing error message in case __radd__
doesn't exist.
</content>
</entry>
<entry>
<title>py/objtype: Make sure mp_binary_op_method_name has full size again.</title>
<updated>2017-09-07T09:54:58+00:00</updated>
<author>
<name>Paul Sokolovsky</name>
<email>pfalcon@users.sourceforge.net</email>
</author>
<published>2017-09-07T09:54:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=6d4cac088eb29c7909f81121608546ca1b5e292e'/>
<id>urn:sha1:6d4cac088eb29c7909f81121608546ca1b5e292e</id>
<content type='text'>
After recent refactorings to mp_binary_op_t, and make it future refactoring
proof for now, at the cost of extra element in the array.
</content>
</entry>
<entry>
<title>py/objtype: Implement fallback for instance inplace special methods.</title>
<updated>2017-09-04T13:44:21+00:00</updated>
<author>
<name>Paul Sokolovsky</name>
<email>pfalcon@users.sourceforge.net</email>
</author>
<published>2017-09-01T23:39:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=60749e57f24741c685d2ae125cfff27d021eb90d'/>
<id>urn:sha1:60749e57f24741c685d2ae125cfff27d021eb90d</id>
<content type='text'>
If __iop__ is not defined, call __op__ instead. This is desired behavior
for immutable types, __iop__ needs to be defined only for mutable types.
</content>
</entry>
</feed>
