<feed xmlns='http://www.w3.org/2005/Atom'>
<title>suspect-devices/circuitpython/py/modbuiltins.c, branch v1.4.5</title>
<subtitle>CircuitPython - a Python implementation for teaching coding with microcontrollers</subtitle>
<id>https://git.suspectdevices.com/suspect-devices/circuitpython/atom?h=v1.4.5</id>
<link rel='self' href='https://git.suspectdevices.com/suspect-devices/circuitpython/atom?h=v1.4.5'/>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/'/>
<updated>2015-07-19T18:49:44+00:00</updated>
<entry>
<title>modbuiltins: Implement round() to precision.</title>
<updated>2015-07-19T18:49:44+00:00</updated>
<author>
<name>Sebastian Plamauer</name>
<email>oeplse@gmail.com</email>
</author>
<published>2015-07-14T12:44:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=1e8ca3a3cf442733f9210be4d5f6a5b63135a16d'/>
<id>urn:sha1:1e8ca3a3cf442733f9210be4d5f6a5b63135a16d</id>
<content type='text'>
</content>
</entry>
<entry>
<title>py: Add MP_BINARY_OP_DIVMOD to simplify and consolidate divmod builtin.</title>
<updated>2015-06-13T22:36:30+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2015-06-13T21:00:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=c5029bcbf37fd1a3fb145d9fa9e4a5094478f17b'/>
<id>urn:sha1:c5029bcbf37fd1a3fb145d9fa9e4a5094478f17b</id>
<content type='text'>
</content>
</entry>
<entry>
<title>py: Expose KeyboardInterrupt in builtins module.</title>
<updated>2015-06-05T09:46:22+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2015-06-05T09:46:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=d7192fe68c96974691f880b5b82b642bf891cb23'/>
<id>urn:sha1:d7192fe68c96974691f880b5b82b642bf891cb23</id>
<content type='text'>
</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>objsingleton: New home for Ellipsis and NotImplemented.</title>
<updated>2015-05-05T19:18:07+00:00</updated>
<author>
<name>Paul Sokolovsky</name>
<email>pfalcon@users.sourceforge.net</email>
</author>
<published>2015-05-05T19:18:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=76677270218fb5732296e4fe1a0acbe05c8f818c'/>
<id>urn:sha1:76677270218fb5732296e4fe1a0acbe05c8f818c</id>
<content type='text'>
Having NotImplemented as MP_OBJ_SENTINEL turned out to be problematic
(it needs to be checked for in a lot of places, otherwise it'll crash
as would pass MP_OBJ_IS_OBJ()), so made a proper singleton value like
Ellipsis, both of them sharing the same type.
</content>
</entry>
<entry>
<title>modbuiltins: Add NotImplemented builtin constant.</title>
<updated>2015-05-04T16:45:53+00:00</updated>
<author>
<name>Paul Sokolovsky</name>
<email>pfalcon@users.sourceforge.net</email>
</author>
<published>2015-05-04T16:45:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=5ab5ac5448573fa34cc2316d895706c24a412f36'/>
<id>urn:sha1:5ab5ac5448573fa34cc2316d895706c24a412f36</id>
<content type='text'>
From https://docs.python.org/3/library/constants.html#NotImplemented :
"Special value which should be returned by the binary special methods
(e.g. __eq__(), __lt__(), __add__(), __rsub__(), etc.) to indicate
that the operation is not implemented with respect to the other type;
may be returned by the in-place binary special methods (e.g. __imul__(),
__iand__(), etc.) for the same purpose. Its truth value is true."

Some people however appear to abuse it to mean "no value" when None is
a legitimate value (don't do that).
</content>
</entry>
<entry>
<title>py: Make viper codegen raise proper exception (ViperTypeError) on error.</title>
<updated>2015-04-20T13:29:31+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2015-04-20T13:29:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=c8b60f013b9d624a74ad502460f2bc7d00c39644'/>
<id>urn:sha1:c8b60f013b9d624a74ad502460f2bc7d00c39644</id>
<content type='text'>
This fixes a long standing problem that viper code generation gave
terrible error messages, and actually no errors on pyboard where
assertions are disabled.

Now all compile-time errors are raised as proper Python exceptions, and
are of type ViperTypeError.

Addresses issue #940.
</content>
</entry>
<entry>
<title>py: Fix builtin ord so that it can handle bytes values &gt;= 0x80.</title>
<updated>2015-04-19T11:26:46+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2015-04-19T11:26:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=d8cbbcaa9d057f210b192bde68fde551972e426c'/>
<id>urn:sha1:d8cbbcaa9d057f210b192bde68fde551972e426c</id>
<content type='text'>
Addresses issue #1188.
</content>
</entry>
<entry>
<title>py: Convert occurrences of non-debug printf to mp_printf.</title>
<updated>2015-04-16T14:30:16+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2015-04-11T11:15:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=e72cda99fd5fc9e7c6476eb8574c4401d3ef9560'/>
<id>urn:sha1:e72cda99fd5fc9e7c6476eb8574c4401d3ef9560</id>
<content type='text'>
</content>
</entry>
<entry>
<title>py: Make mp_sys_stdout_print object, wrapping sys.stdout for mp_print*.</title>
<updated>2015-04-16T14:30:16+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2015-04-11T11:01:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=5ae5ec986ea5e14321f6c8091454c165c23b40c5'/>
<id>urn:sha1:5ae5ec986ea5e14321f6c8091454c165c23b40c5</id>
<content type='text'>
So now all printing should go via either mp_plat_print or
mp_sys_stdout_print.
</content>
</entry>
</feed>
