- 13 Aug, 2014 1 commit
-
-
Damien George authored
Multiplication of a tuple, list, str or bytes now yields an empty sequence (instead of crashing). Addresses issue #799 Also added ability to mult bytes on LHS by integer.
-
- 12 Aug, 2014 11 commits
-
-
Damien George authored
-
Damien George authored
-
Paul Sokolovsky authored
-
Paul Sokolovsky authored
The only change is line-ending convesion to LF.
-
Paul Sokolovsky authored
-
Damien George authored
Also disable gc module on bare-arm port.
-
Damien George authored
Also fixes compiler error in moductypes when compiled without debugging. Addresses issue #778.
-
Damien George authored
-
Damien George authored
Can now index ranges with integers and slices, and reverse ranges (although reversing is not very efficient). Not sure how useful this stuff is, but gets us closer to having all of Python's builtins.
-
Damien George authored
reversed function now implemented, and works for tuple, list, str, bytes and user objects with __len__ and __getitem__. Renamed mp_builtin_len to mp_obj_len to make it publically available (eg for reversed).
-
Damien George authored
-
- 11 Aug, 2014 3 commits
-
-
Damien George authored
Saves code bytes and makes it faster, so why not?
-
Damien George authored
-
Paul Sokolovsky authored
Fixes #795.
-
- 10 Aug, 2014 12 commits
-
-
Damien George authored
-
Damien George authored
Thanks to David Siorpaes.
-
Paul Sokolovsky authored
Similar to other methods and following CPython3 strictness.
-
Paul Sokolovsky authored
-
Paul Sokolovsky authored
-
Damien George authored
-
Damien George authored
-
Damien George authored
-
Damien George authored
-
Paul Sokolovsky authored
-
Paul Sokolovsky authored
This happens for example for zero-size arrays. As .get_buffer() method now has explicit return value, it's enough to distinguish success vs failure of getting buffer.
-
Paul Sokolovsky authored
-
- 09 Aug, 2014 2 commits
-
-
Damien George authored
-
Damien George authored
-
- 08 Aug, 2014 11 commits
-
-
Damien George authored
-
Damien George authored
-
Damien George authored
Addresses some issues from #585.
-
Damien George authored
-
Damien George authored
-
Damien George authored
Trying to move towards consistency, let's use _ exclusively in names of source files (eg .c, .h, .csv).
-
Damien George authored
-
Damien George authored
-
-
Damien George authored
This was a nasty bug to track down. It only had consequences when the heap size was just the right size to expose the rounding error in the calculation of the finaliser table size. And, a script had to allocate a small (1 or 2 cell) object at the very end of the heap. And, this object must not have a finaliser. And, the initial state of the heap must have been all bits set to 1. All these conspire on the pyboard, but only if your run the script fresh (so unused memory is all 1's), and if your script allocates a lot of small objects (eg 2-char strings that are not interned).
-
Dave Hylands authored
Converts generted pins to use qstrs instead of string pointers. This patch also adds the following functions: pyb.Pin.names() pyb.Pin.af_list() pyb.Pin.gpio() dir(pyb.Pin.board) and dir(pyb.Pin.cpu) also produce useful results. pyb.Pin now takes kw args. pyb.Pin.__str__ now prints more useful information about the pin configuration. I found the following functions in my boot.py to be useful: ```python def pins(): for pin_name in dir(pyb.Pin.board): pin = pyb.Pin(pin_name) print('{:10s} {:s}'.format(pin_name, str(pin))) def af(): for pin_name in dir(pyb.Pin.board): pin = pyb.Pin(pin_name) print('{:10s} {:s}'.format(pin_name, str(pin.af_list()))) ```
-