summaryrefslogtreecommitdiffstatshomepage
path: root/py
Commit message (Collapse)AuthorAge
* Tidy up some configuration options.Damien George2014-05-21
| | | | | | | | | | MP_ALLOC_* -> MICROPY_ALLOC_* MICROPY_PATH_MAX -> MICROPY_ALLOC_PATH_MAX MICROPY_ENABLE_REPL_HELPERS -> MICROPY_HELPER_REPL MICROPY_ENABLE_LEXER_UNIX -> MICROPY_HELPER_LEXER_UNIX MICROPY_EXTRA_* -> MICROPY_PORT_* See issue #35.
* Merge pull request #607 from Anton-2/osx-clangDamien George2014-05-21
|\ | | | | Allow compilation of unix port under clang on OS X
| * Fix some unused variables, and silence a clang warning about initialization ↵Antonin ENFRUN2014-05-12
| | | | | | | | override in vmentrytable.h
| * unix: Create __bss_start and _end symbols for Mach-O targets.Antonin ENFRUN2014-05-12
| | | | | | | | It's a hack, but can't find a cleaner way to do it.
* | py: Rename MP_OBJ_NOT_SUPPORTED to MP_OBJ_NULL.Damien George2014-05-21
| | | | | | | | See issue #608 for justification.
* | modstruct: struct_calcsize: Fix case of uninitialized var.Paul Sokolovsky2014-05-20
| |
* | py: Implement proper separation between io.FileIO and io.TextIOWrapper.Paul Sokolovsky2014-05-19
| | | | | | | | | | | | | | io.FileIO is binary I/O, ans actually optional. Default file type is io.TextIOWrapper, which provides str results. CPython3 explicitly describes io.TextIOWrapper as buffered I/O, but we don't have buffering support yet anyway.
* | objexcept: Implement explicit __init__ method, useful for subclasses.Paul Sokolovsky2014-05-19
| |
* | objtype: Separate __new__ and __init__ methods.Paul Sokolovsky2014-05-19
| | | | | | | | | | | | | | | | | | | | | | Now schedule is: for native types, we call ->make_new() C-level method, which should perform actions of __new__ and __init__ (note that this is not compliant, but is efficient), but for user types, __new__ and __init__ are called as expected. Also, make sure we convert scalar attribute value to a bound-pair tight in mp_obj_class_lookup() method, which avoids converting it again and again in its callers.
* | py: Fix mp_obj_t -> mp_const_obj_t for mp_obj_int_get_checked()Sven Wegener2014-05-17
| | | | | | | | Signed-off-by: Sven Wegener <sven.wegener@stealer.net>
* | py: More mp_identity usage.Paul Sokolovsky2014-05-17
| |
* | py: More const usage.Paul Sokolovsky2014-05-17
| |
* | objstr: startswith(): Accept optional "start" arg.Paul Sokolovsky2014-05-15
| |
* | py: Implement more complete bytes comparison handling.Paul Sokolovsky2014-05-15
| |
* | sequence: Fix yet another case of improper sequence comparison.Paul Sokolovsky2014-05-15
| | | | | | | | This time, in mp_seq_cmp_bytes(). How many more cases are still lurking?
* | objstringio: Implement io.BytesIO.Paul Sokolovsky2014-05-15
| | | | | | | | | | Done in generalized manner, allowing any stream class to be specified as working with bytes.
* | objstr.c: Partial implementation of .rsplit().Paul Sokolovsky2014-05-14
| | | | | | | | sep=None is TODO.
* | py: Improve mpz_and function.Damien George2014-05-13
| | | | | | | | This should now have correct (and optimal) behaviour.
* | py, unix: Add copyright for modules I worked closely on.Paul Sokolovsky2014-05-13
| |
* | py: Fix bug in mpz_and function.Damien George2014-05-12
| | | | | | | | Addresses issue #610.
* | py: Remove emit_glue init and deinit. Needed only for debugging.Damien George2014-05-12
| | | | | | | | | | Debugging output for emit_glue now simplified so that the init and deinit functions are no longer needed.
* | py: Add support for __debug__ constant.Damien George2014-05-12
| | | | | | | | | | | | | | | | | | __debug__ now resolves to True or False. Its value needs to be set by mp_set_debug(). TODO: call mp_set_debug in unix/ port. TODO: optimise away "if False:" statements in compiler.
* | py: Rename BYTE_CODE to BYTECODE (this was missed in previous rename).Damien George2014-05-12
| |
* | modstruct: Implement count specifier for strings (e.g. "100s").Paul Sokolovsky2014-05-12
|/ | | | Infra for counts of other types is there, need last mile to be implemented.
* modstruct: Use MP_OBJ_FUN_ARGS_MAX instead of -1.v1.0.1Paul Sokolovsky2014-05-11
|
* objstr: Slice indexing: support bytes properly.Paul Sokolovsky2014-05-11
|
* objstr: Make .split() support bytes.Paul Sokolovsky2014-05-11
|
* objstr: Make .join() support bytes.Paul Sokolovsky2014-05-11
|
* py: Fix __len__ special method result handling.Paul Sokolovsky2014-05-11
| | | | Having both MP_OBJ_NOT_SUPPORTED and MP_OBJ_NULL is arguably confusing.
* py: Don't expect that type->getiter() always returns iterator, check for NULL.Paul Sokolovsky2014-05-11
| | | | This is better than forcing each getiter() implementation to raise exception.
* showbc: Decode MAP_ADD.Paul Sokolovsky2014-05-11
|
* py: Add basic implementation of hasattr() function.Paul Sokolovsky2014-05-11
|
* py: Use mp_arg_check_num in more places.Damien George2014-05-11
| | | | | | | | | Updated functions now do proper checking that n_kw==0, and are simpler because they don't have to explicitly raise an exception. Down side is that the error messages no longer include the function name, but that's acceptable. Saves order 300 text bytes on x64 and ARM.
* py: frozenset() creates an empty frozenset.Damien George2014-05-11
|
* py: Rename globally-accessible tuple functions, prefix with mp_obj_.Damien George2014-05-11
| | | | | Likely there are other functions that should be renamed, but this is a start.
* py: Rename some unichar functions for consistency.Damien George2014-05-11
|
* py: Rename MICROPY_SYS_EXIT to MICROPY_MOD_SYS_EXIT.Damien George2014-05-11
| | | | For consistency with MICROPY_MOD_SYS_STDFILES, etc.
* py: Give up and make mp_obj_str_get_data() deal with bytes too.Paul Sokolovsky2014-05-11
| | | | | | This is not fully correct re: error handling, because we should check that that types are used consistently (only str's or only bytes), but magically makes lot of functions support bytes.
* objstr: Make *strip() accept bytes.Paul Sokolovsky2014-05-11
|
* objtuple: Go out of the way to support comparison of subclasses.Paul Sokolovsky2014-05-11
| | | | | | | | | | | Two things are handled here: allow to compare native subtypes of tuple, e.g. namedtuple (TODO: should compare type too, currently compared duck-typedly by content). Secondly, allow user sunclasses of tuples (and its subtypes) be compared either. "Magic" I did previously in objtype.c covers only one argument (lhs is many), so we're in trouble when lhs is native type - there's no other option besides handling rhs in special manner. Fortunately, this patch outlines approach with fast path for native types.
* py: Don't try to "bind" types store as attributes of objects.Paul Sokolovsky2014-05-11
| | | | | | | | This was hit when trying to make urlparse.py from stdlib run. Took quite some time to debug. TODO: Reconsile bound method creation process better, maybe callable is to generic type to bind at all?
* objstr: Make .[r]partition() work with bytes.Paul Sokolovsky2014-05-11
|
* objboundmeth: If detailed reporting enabled, print object content.Paul Sokolovsky2014-05-11
| | | | Similar to closure and cell.
* py: Start making good use of mp_const_obj_t.Paul Sokolovsky2014-05-11
|
* objlist: Support list slice deletion.Paul Sokolovsky2014-05-10
|
* objlist: Implement non-growing slice assignment.Paul Sokolovsky2014-05-10
| | | | Slice value to assign can be only a list so far too.
* py: Fix prefix on few sequence helpers, was incorrectly "mp_".Paul Sokolovsky2014-05-10
|
* objtype: Comments for duplicating code in runtime.c.Paul Sokolovsky2014-05-10
|
* objtype: Implement ->getiter() method for instances.Paul Sokolovsky2014-05-10
| | | | Includes support for native bases.
* py: Make mp_obj_print() handle null object w/o segfault if debug build.Paul Sokolovsky2014-05-10
| | | | Happens regularly when used for debugging.