Commit message (Collapse) | Author | Age | |
---|---|---|---|
* | py: Allow +, in, and compare ops between bytes and bytearray/array. | Damien George | 2014-11-05 |
| | | | | | | Eg b"123" + bytearray(2) now works. This patch actually decreases code size while adding functionality: 32-bit unix down by 128 bytes, stmhal down by 84 bytes. | ||
* | py: Fix builtin callable so it checks user-defined instances correctly. | Damien George | 2014-11-03 |
| | | | | Addresses issue #953. | ||
* | py: Fix bug with right-shifting small ints by large amounts. | Paul Sokolovsky | 2014-11-02 |
| | | | | Undefined behavior in C, needs explicit check. | ||
* | py: Add builtin round function. | Damien George | 2014-10-31 |
| | | | | Addresses issue #934. | ||
* | objstr: Allow to convert any buffer proto object to str. | Paul Sokolovsky | 2014-10-31 |
| | | | | | Original motivation is to support converting bytearrays, but easier to just support buffer protocol at all. | ||
* | tests: Get builtin_compile to skin properly on pyboard. | Damien George | 2014-10-26 |
| | |||
* | py: Fix memoryview referencing so it retains ptr to original buffer. | Damien George | 2014-10-26 |
| | | | | | This way, if original parent object is GC'd, the memoryview still points to the underlying buffer data so that buffer is not GC'd. | ||
* | tests: Add test for compile builtin. | Damien George | 2014-10-25 |
| | |||
* | py: Add builtin memoryview object (mostly using array code). | Damien George | 2014-10-23 |
| | |||
* | py: Fix smallint modulo with negative arguments. | Damien George | 2014-10-22 |
| | | | | Addresses issue #927. | ||
* | py: Remove unused and unneeded SystemError exception. | Damien George | 2014-10-22 |
| | | | | | It's purpose is for internal errors that are not catastrophic (ie not as bad as RuntimeError). Since we don't use it, we don't need it. | ||
* | py: Add more compiler optimisations for constant if/while conditions. | Damien George | 2014-10-17 |
| | |||
* | tests: Add test for nested while with exc and break. | Damien George | 2014-10-17 |
| | |||
* | objclosure: Fix printing of generator closures. | Paul Sokolovsky | 2014-10-16 |
| | | | | The code previously assumed that only functions can be closed over. | ||
* | py: Make compiler return a proper exception on SyntaxError. | Damien George | 2014-10-05 |
| | |||
* | py: Remove IOError since it's deprecated; use OSError instead. | Damien George | 2014-09-30 |
| | | | | | | | | | | | In CPython IOError (and EnvironmentError) is deprecated and aliased to OSError. All modules that used to raise IOError now raise OSError (or a derived exception). In Micro Python we never used IOError (except 1 place, incorrectly) and so don't need to keep it. See http://legacy.python.org/dev/peps/pep-3151/ for background. | ||
* | tests: Add test for exception matching of a tuple of exceptions. | Damien George | 2014-09-25 |
| | |||
* | py: Make native emitter handle multi-compare and not/is not/not in ops. | Damien George | 2014-09-23 |
| | |||
* | tests: Fix uctypes tests to run on 64bit arch; enable more native tests. | Damien George | 2014-09-23 |
| | |||
* | py: Make mpz able to use 16 bits per digit; and 32 on 64-bit arch. | Damien George | 2014-09-06 |
| | | | | | | | | | | | | | | | | Previously, mpz was restricted to using at most 15 bits in each digit, where a digit was a uint16_t. With this patch, mpz can use all 16 bits in the uint16_t (improvement to mpn_div was required). This gives small inprovements in speed and RAM usage. It also yields savings in ROM code size because all of the digit masking operations become no-ops. Also, mpz can now use a uint32_t as the digit type, and hence use 32 bits per digit. This will give decent improvements in mpz speed on 64-bit machines. Test for big integer division added. | ||
* | py: Fix 2 bugs in native emitter: jump_or_pop and stack settling. | Damien George | 2014-08-29 |
| | | | | Addresses issue #838. | ||
* | Make int(b'123') work properly. | Dave Hylands | 2014-08-26 |
| | |||
* | py: Add dispatch for user defined ==, >, <=, >=. | Damien George | 2014-08-26 |
| | | | | Addresses issue #827. | ||
* | py: Consolidate min/max functions into one, and add key= argument. | Damien George | 2014-08-24 |
| | | | | Addresses issue #811. | ||
* | py: Fix mult by negative number of tuple, list, str, bytes. | Damien George | 2014-08-13 |
| | | | | | | | 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. | ||
* | py: Improve range: add len, subscr, proper print. | Damien George | 2014-08-12 |
| | | | | | | | | 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. | ||
* | py: Implement builtin reversed() function. | Damien George | 2014-08-12 |
| | | | | | | | | 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). | ||
* | objstr: Make sure that bytes are indexed as bytes, not as unicode. | Paul Sokolovsky | 2014-08-11 |
| | | | | Fixes #795. | ||
* | objarray: Implement equality testing between arrays and other buffers. | Paul Sokolovsky | 2014-08-10 |
| | |||
* | tests: Rename test scripts, changing - to _ for consistency. | Damien George | 2014-07-05 |
| | | | | | | From now on, all new tests must use underscore. Addresses issue #727. | ||
* | py: Automatically ake __new__ a staticmethod. | Damien George | 2014-07-05 |
| | | | | Addresses issue #622. | ||
* | modstruct: Fix alignment handling issues. | Paul Sokolovsky | 2014-06-25 |
| | | | | Also, factor out mp_binary_get_int() function. | ||
* | objstr: Be 8-bit clean even for repr(). | Paul Sokolovsky | 2014-06-14 |
| | | | | | | | | | This will allow roughly the same behavior as Python3 for non-ASCII strings, for example, print("<phrase in non-Latin script>".split()) will print list of words, not weird hex dump (like Python2 behaves). (Of course, that it will print list of words, if there're "words" in that phrase at all, separated by ASCII-compatible whitespace; that surely won't apply to every human language in existence). | ||
* | tests: Add testcases for "complicated" args to generator functions. | Paul Sokolovsky | 2014-06-11 |
| | |||
* | py: Implement __contains__ special method. | Damien George | 2014-06-10 |
| | |||
* | objtype: Fix passing of class param to inherited classmethods. | Paul Sokolovsky | 2014-06-08 |
| | | | | This is getting more and more tangled, but that's old news. | ||
* | tests: Add more tests for default keyword-only args. | Damien George | 2014-06-08 |
| | |||
* | tests: Fix default arg test. | Damien George | 2014-06-08 |
| | |||
* | py: Make sure getattr() works with non-interned strings (by interning them). | Paul Sokolovsky | 2014-06-08 |
| | |||
* | py: Implement default keyword only args. | Damien George | 2014-06-07 |
| | | | | Should finish addressing issue #524. | ||
* | Fix str.modulo when precision is specified. | Dave Hylands | 2014-06-05 |
| | |||
* | Change comments (mainly URLs) to no longer specifically say Python 3.3 | Chris Angelico | 2014-06-06 |
| | |||
* | objstr: Implement "%(key)s" % {} formatting for strings and dicts. | Paul Sokolovsky | 2014-06-05 |
| | | | | | Also, make sure that args to "*" format specifiers are bounds-checked properly and don't lead for segfaults in case of mismatch. | ||
* | py: Implement full behaviour of dict.update(), and dict(). | Damien George | 2014-06-03 |
| | | | | | | | | | | | | | Add keyword args to dict.update(), and ability to take a dictionary as argument. dict() class constructor can now use dict.update() directly. This patch loses fast path for dict(other_dict), but is that really needed? Any anyway, this idiom will now re-hash the dictionary, so is arguably more memory efficient. Addresses issue #647. | ||
* | py: Fix stack underflow with optimised for loop. | Damien George | 2014-05-31 |
| | |||
* | tests: Add another test for break-from-for-loop. | Damien George | 2014-05-31 |
| | |||
* | add methods isspace(), isalpha(), isdigit(), isupper() and islower() to str | Kim Bauters | 2014-05-31 |
| | |||
* | tests: Add test for break in for. | Paul Sokolovsky | 2014-05-31 |
| | | | | For #635 / 25c84643b6c4da169cdb11de54f027e3c477c301. | ||
* | objstr: *strip(): If nothing is stripped, don't create dup string. | Paul Sokolovsky | 2014-05-30 |
| | |||
* | objstr: *strip(): Fix handling of one-char subject strings. | Paul Sokolovsky | 2014-05-30 |
| |