<feed xmlns='http://www.w3.org/2005/Atom'>
<title>suspect-devices/circuitpython/py/opmethods.c, branch 4.0.0-alpha.3</title>
<subtitle>CircuitPython - a Python implementation for teaching coding with microcontrollers</subtitle>
<id>https://git.suspectdevices.com/suspect-devices/circuitpython/atom?h=4.0.0-alpha.3</id>
<link rel='self' href='https://git.suspectdevices.com/suspect-devices/circuitpython/atom?h=4.0.0-alpha.3'/>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/'/>
<updated>2017-11-24T03:48:23+00:00</updated>
<entry>
<title>py/runtime: Add MP_BINARY_OP_CONTAINS as reverse of MP_BINARY_OP_IN.</title>
<updated>2017-11-24T03:48:23+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2017-11-24T02:04:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=5e34a113eaaf736fb4f703a3ee0892e1705d0a63'/>
<id>urn:sha1:5e34a113eaaf736fb4f703a3ee0892e1705d0a63</id>
<content type='text'>
Before this patch MP_BINARY_OP_IN had two meanings: coming from bytecode it
meant that the args needed to be swapped, but coming from within the
runtime meant that the args were already in the correct order.  This lead
to some confusion in the code and comments stating how args were reversed.
It also lead to 2 bugs: 1) containment for a subclass of a native type
didn't work; 2) the expression "{True} in True" would illegally succeed and
return True.  In both of these cases it was because the args to
MP_BINARY_OP_IN ended up being reversed twice.

To fix these things this patch introduces MP_BINARY_OP_CONTAINS which
corresponds exactly to the __contains__ special method, and this is the
operator that built-in types should implement.  MP_BINARY_OP_IN is now only
emitted by the compiler and is converted to MP_BINARY_OP_CONTAINS by
swapping the arguments.
</content>
</entry>
<entry>
<title>py/opmethods: Include the correct header for binary op enums.</title>
<updated>2017-11-24T01:16:21+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2017-11-24T01:16:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=5b2f62aff312949c9c7edec6cfaaf4f97d93c442'/>
<id>urn:sha1:5b2f62aff312949c9c7edec6cfaaf4f97d93c442</id>
<content type='text'>
By directly including runtime0.h the mpconfig.h settings are not included
and so the enums in runtime0.h can be incorrect.
</content>
</entry>
<entry>
<title>all: Use the name MicroPython consistently in comments</title>
<updated>2017-07-31T08:35:40+00:00</updated>
<author>
<name>Alexander Steffen</name>
<email>devel.20.webmeister@spamgourmet.com</email>
</author>
<published>2017-06-30T07:22:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=55f33240f3d7051d4213629e92437a36f1fac50e'/>
<id>urn:sha1:55f33240f3d7051d4213629e92437a36f1fac50e</id>
<content type='text'>
There were several different spellings of MicroPython present in comments,
when there should be only one.
</content>
</entry>
<entry>
<title>py: Move to guarded includes, everywhere in py/ core.</title>
<updated>2015-01-01T20:32:09+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2015-01-01T20:27:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=51dfcb4bb7613ed164952712d9a5235a7b833cde'/>
<id>urn:sha1:51dfcb4bb7613ed164952712d9a5235a7b833cde</id>
<content type='text'>
Addresses issue #1022.
</content>
</entry>
<entry>
<title>Add license header to (almost) all files.</title>
<updated>2014-05-03T22:27:38+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2014-05-03T22:27:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=04b9147e150d2d6fa3750f312fe328b6a71c1b28'/>
<id>urn:sha1:04b9147e150d2d6fa3750f312fe328b6a71c1b28</id>
<content type='text'>
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/.
</content>
</entry>
<entry>
<title>py, unix: Make "mpconfig.h" be first included, as other headers depend on it.</title>
<updated>2014-05-02T14:48:40+00:00</updated>
<author>
<name>Paul Sokolovsky</name>
<email>pfalcon@users.sourceforge.net</email>
</author>
<published>2014-05-02T14:47:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=f54bcbf0997211a3d2a04bab09c79f602fa0c8e9'/>
<id>urn:sha1:f54bcbf0997211a3d2a04bab09c79f602fa0c8e9</id>
<content type='text'>
Specifically, nlr.h does.
</content>
</entry>
<entry>
<title>py: Merge BINARY_OP_SUBSCR and store_subscr (w/ delete) into subscr.</title>
<updated>2014-04-17T21:10:53+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2014-04-17T21:10:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=729f7b42d65c016c9d5f27fb8a8122869f06c129'/>
<id>urn:sha1:729f7b42d65c016c9d5f27fb8a8122869f06c129</id>
<content type='text'>
mp_obj_t-&gt;subscr now does load/store/delete.
</content>
</entry>
<entry>
<title>objdict: Add __delitem__.</title>
<updated>2014-04-13T20:55:59+00:00</updated>
<author>
<name>Paul Sokolovsky</name>
<email>pfalcon@users.sourceforge.net</email>
</author>
<published>2014-04-13T20:55:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=14de114ba811614ba6e058f6d864129f5c8b73bb'/>
<id>urn:sha1:14de114ba811614ba6e058f6d864129f5c8b73bb</id>
<content type='text'>
</content>
</entry>
<entry>
<title>objdict: Add __setitem__.</title>
<updated>2014-04-13T20:41:49+00:00</updated>
<author>
<name>Paul Sokolovsky</name>
<email>pfalcon@users.sourceforge.net</email>
</author>
<published>2014-04-13T20:41:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=cd94b384a39a2d7f3efa557ce0bda305d0aa3cc7'/>
<id>urn:sha1:cd94b384a39a2d7f3efa557ce0bda305d0aa3cc7</id>
<content type='text'>
</content>
</entry>
<entry>
<title>py: Factor out impl of special methods for builtin types into opmethods.c</title>
<updated>2014-04-13T08:54:53+00:00</updated>
<author>
<name>Paul Sokolovsky</name>
<email>pfalcon@users.sourceforge.net</email>
</author>
<published>2014-04-13T08:53:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=68e7c5146ce24a593889df67d50d8f9c0cfa528e'/>
<id>urn:sha1:68e7c5146ce24a593889df67d50d8f9c0cfa528e</id>
<content type='text'>
</content>
</entry>
</feed>
