<feed xmlns='http://www.w3.org/2005/Atom'>
<title>suspect-devices/circuitpython/tests/micropython/viper_error.py.exp, branch 4.0.0-beta.7</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-beta.7</id>
<link rel='self' href='https://git.suspectdevices.com/suspect-devices/circuitpython/atom?h=4.0.0-beta.7'/>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/'/>
<updated>2018-05-22T14:22:35+00:00</updated>
<entry>
<title>py/emit: Combine yield value and yield-from emit funcs into one.</title>
<updated>2018-05-22T14:22:35+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2018-05-18T14:30:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=e686c940525c5b87d02e3dd7bfcdec23cfa996dd'/>
<id>urn:sha1:e686c940525c5b87d02e3dd7bfcdec23cfa996dd</id>
<content type='text'>
Reduces code size by:

   bare-arm:   -24
minimal x86:   -72
   unix x64:  -200
unix nanbox:   -72
      stm32:   -52
     cc3200:   -32
    esp8266:   -84
      esp32:   -24
</content>
</entry>
<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>tests/micropython/viper_error: Add more tests to improve coverage.</title>
<updated>2017-03-14T12:05:41+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2017-03-14T11:52:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=e29f704b6776ac9f7b95bb35d53d65948e995b38'/>
<id>urn:sha1:e29f704b6776ac9f7b95bb35d53d65948e995b38</id>
<content type='text'>
</content>
</entry>
<entry>
<title>py/emitnative: Raise ViperTypeError for unsupported unary ops.</title>
<updated>2015-10-08T12:08:59+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2015-10-08T12:08:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=9f5f156b9d911b6c6282eb4cf0e4f8a9129169c5'/>
<id>urn:sha1:9f5f156b9d911b6c6282eb4cf0e4f8a9129169c5</id>
<content type='text'>
</content>
</entry>
<entry>
<title>tests: Add more tests for viper, including tests for ViperTypeError's.</title>
<updated>2015-04-22T22:18:28+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2015-04-22T22:18:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=40d43ea88dfff431dd863146dd2e62ea8c24683e'/>
<id>urn:sha1:40d43ea88dfff431dd863146dd2e62ea8c24683e</id>
<content type='text'>
</content>
</entry>
<entry>
<title>tests: Add tests for SyntaxError, TypeError, and other missing things.</title>
<updated>2015-03-25T23:10:09+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2015-03-25T23:10:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=214179b430ebc1101e28b19248b6166f5e511e6b'/>
<id>urn:sha1:214179b430ebc1101e28b19248b6166f5e511e6b</id>
<content type='text'>
This is intended to improve coverage of the test suite.
</content>
</entry>
</feed>
