<feed xmlns='http://www.w3.org/2005/Atom'>
<title>suspect-devices/circuitpython/py/objstr.c, branch v1.4.3</title>
<subtitle>CircuitPython - a Python implementation for teaching coding with microcontrollers</subtitle>
<id>https://git.suspectdevices.com/suspect-devices/circuitpython/atom?h=v1.4.3</id>
<link rel='self' href='https://git.suspectdevices.com/suspect-devices/circuitpython/atom?h=v1.4.3'/>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/'/>
<updated>2015-05-12T21:46:02+00:00</updated>
<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>py: Add optional code to check bytes constructor values are in range.</title>
<updated>2015-04-23T14:28:18+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2015-04-23T14:28:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=ede0f3ab3dfcc4ab1a5799b312395703bf942517'/>
<id>urn:sha1:ede0f3ab3dfcc4ab1a5799b312395703bf942517</id>
<content type='text'>
Compiled in only if MICROPY_CPYTHON_COMPAT is set.

Addresses issue #1093.
</content>
</entry>
<entry>
<title>py: Overhaul and simplify printf/pfenv mechanism.</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-09T22:56:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=7f9d1d6ab923096582622b700bedb6a571518eac'/>
<id>urn:sha1:7f9d1d6ab923096582622b700bedb6a571518eac</id>
<content type='text'>
Previous to this patch the printing mechanism was a bit of a tangled
mess.  This patch attempts to consolidate printing into one interface.

All (non-debug) printing now uses the mp_print* family of functions,
mainly mp_printf.  All these functions take an mp_print_t structure as
their first argument, and this structure defines the printing backend
through the "print_strn" function of said structure.

Printing from the uPy core can reach the platform-defined print code via
two paths: either through mp_sys_stdout_obj (defined pert port) in
conjunction with mp_stream_write; or through the mp_plat_print structure
which uses the MP_PLAT_PRINT_STRN macro to define how string are printed
on the platform.  The former is only used when MICROPY_PY_IO is defined.

With this new scheme printing is generally more efficient (less layers
to go through, less arguments to pass), and, given an mp_print_t*
structure, one can call mp_print_str for efficiency instead of
mp_printf("%s", ...).  Code size is also reduced by around 200 bytes on
Thumb2 archs.
</content>
</entry>
<entry>
<title>objstr: split(None): Fix whitespace properly.</title>
<updated>2015-04-11T21:17:57+00:00</updated>
<author>
<name>Paul Sokolovsky</name>
<email>pfalcon@users.sourceforge.net</email>
</author>
<published>2015-04-11T21:17:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=8b7faa31e1a98fd582db7021152fa25da69635e0'/>
<id>urn:sha1:8b7faa31e1a98fd582db7021152fa25da69635e0</id>
<content type='text'>
</content>
</entry>
<entry>
<title>py: Some trivial cosmetic changes, for code style consistency.</title>
<updated>2015-04-04T14:53:11+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2015-04-04T14:53:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=2801e6fad8b8b3ecdd9c8bc58f9515ff66eca46c'/>
<id>urn:sha1:2801e6fad8b8b3ecdd9c8bc58f9515ff66eca46c</id>
<content type='text'>
</content>
</entry>
<entry>
<title>objstr: Fix bugs introduced by inability to have shadow variables.</title>
<updated>2015-04-03T22:55:40+00:00</updated>
<author>
<name>Paul Sokolovsky</name>
<email>pfalcon@users.sourceforge.net</email>
</author>
<published>2015-04-03T22:55:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=7f59b4b2ca28179c72aa12f35fe59cb14017b5b0'/>
<id>urn:sha1:7f59b4b2ca28179c72aa12f35fe59cb14017b5b0</id>
<content type='text'>
Warnings lead to programming errors - as expected.
</content>
</entry>
<entry>
<title>objstr: Avoid variable shadowing.</title>
<updated>2015-04-03T22:24:59+00:00</updated>
<author>
<name>Paul Sokolovsky</name>
<email>pfalcon@users.sourceforge.net</email>
</author>
<published>2015-04-03T22:23:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=acf6aec71cef3dae4431b79f6e530d3c8994a8b4'/>
<id>urn:sha1:acf6aec71cef3dae4431b79f6e530d3c8994a8b4</id>
<content type='text'>
</content>
</entry>
<entry>
<title>objstr: Add .splitlines() method.</title>
<updated>2015-04-03T21:09:48+00:00</updated>
<author>
<name>Paul Sokolovsky</name>
<email>pfalcon@users.sourceforge.net</email>
</author>
<published>2015-04-03T21:09:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=ac2f7a7f6aab135e90dd12d30b51d857628b0a59'/>
<id>urn:sha1:ac2f7a7f6aab135e90dd12d30b51d857628b0a59</id>
<content type='text'>
splitlines() occurs ~179 times in CPython3 standard library, so was
deemed worthy to implement. The method has subtle semantic differences
from just .split("\n"). It is also defined as working for any end-of-line
combination, but this is currently not implemented - it works only with
LF line-endings (which should be OK for text strings on any platforms,
but not OK for bytes).
</content>
</entry>
<entry>
<title>objstr: Expose mp_obj_str_split() for reuse in other modules.</title>
<updated>2015-03-23T20:43:37+00:00</updated>
<author>
<name>Paul Sokolovsky</name>
<email>pfalcon@users.sourceforge.net</email>
</author>
<published>2015-03-23T20:15:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=870517123333bb23751332ea6e5a65f690423971'/>
<id>urn:sha1:870517123333bb23751332ea6e5a65f690423971</id>
<content type='text'>
</content>
</entry>
<entry>
<title>py: Remove unnecessary and unused sgn argument from pfenv_print_mp_int.</title>
<updated>2015-03-14T22:32:40+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2015-03-14T22:32:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=fa1edff006ced6f2e4b4ba4f899809c0d2a63de0'/>
<id>urn:sha1:fa1edff006ced6f2e4b4ba4f899809c0d2a63de0</id>
<content type='text'>
</content>
</entry>
</feed>
