aboutsummaryrefslogtreecommitdiff
path: root/py
AgeCommit message (Collapse)Author
2014-05-25py: Refactor slice helpers, preparing to support arbitrary slicing.Paul Sokolovsky
2014-05-25Merge branch 'keep-strings-uninterned' of github.com:pfalcon/micropython ↵Damien George
into pfalcon-keep-strings-uninterned Conflicts: py/parse.c
2014-05-25sequence: Throw exception for not implemented slice steps.Paul Sokolovsky
2014-05-25objlist: Implement growing slice assignment.Paul Sokolovsky
This means that complete slice operations are supported for lists (but not for bytearray's and array.array's).
2014-05-25py: Handle case of slice start > stop in common sequence function.Paul Sokolovsky
2014-05-25objslice: Support arbitrary objects start, stop, and step.Paul Sokolovsky
Older int-only encoding is not expressive enough to support arbitrary slice assignment operations.
2014-05-24Add SystemExit exception and use it in unix/ and stmhal/ ports.Damien George
Addresses issue #598.
2014-05-24Rename configuration variables controling Python features.Damien George
Now of the form MICROPY_PY_*. See issue #35.
2014-05-24objstr: Implement .endswith().Paul Sokolovsky
2014-05-24unix modsocket: Make .makefile() method more compliant.Paul Sokolovsky
.makefile() should allow to specify which stream time to create - byte or text.
2014-05-22py: Initial attempts to actually allow implementing __new__ in Python.Paul Sokolovsky
Caveat is that __new__ should recurse to base class __new__, and ultimately, object.__new__ is what handles instance allocation.
2014-05-21objobject: Fix arguments to __init__().Paul Sokolovsky
2014-05-21Merge branch 'master' of github.com:micropython/micropythonDamien George
2014-05-21Tidy up some configuration options.Damien George
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.
2014-05-21objtype: super: Fall back to "object" lookup as last resort.Paul Sokolovsky
Also, define object.__init__() (semantically empty, purely CPython compat measure). Addresses #520.
2014-05-21objtype: super: Add stop condition for looking up in base types.Paul Sokolovsky
2014-05-21Merge pull request #607 from Anton-2/osx-clangDamien George
Allow compilation of unix port under clang on OS X
2014-05-21py: Rename MP_OBJ_NOT_SUPPORTED to MP_OBJ_NULL.Damien George
See issue #608 for justification.
2014-05-20modstruct: struct_calcsize: Fix case of uninitialized var.Paul Sokolovsky
2014-05-19py: Implement proper separation between io.FileIO and io.TextIOWrapper.Paul Sokolovsky
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.
2014-05-19objexcept: Implement explicit __init__ method, useful for subclasses.Paul Sokolovsky
2014-05-19objtype: Separate __new__ and __init__ methods.Paul Sokolovsky
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.
2014-05-17py: Fix mp_obj_t -> mp_const_obj_t for mp_obj_int_get_checked()Sven Wegener
Signed-off-by: Sven Wegener <sven.wegener@stealer.net>
2014-05-17py: More mp_identity usage.Paul Sokolovsky
2014-05-17py: More const usage.Paul Sokolovsky
2014-05-15objstr: startswith(): Accept optional "start" arg.Paul Sokolovsky
2014-05-15py: Implement more complete bytes comparison handling.Paul Sokolovsky
2014-05-15sequence: Fix yet another case of improper sequence comparison.Paul Sokolovsky
This time, in mp_seq_cmp_bytes(). How many more cases are still lurking?
2014-05-15objstringio: Implement io.BytesIO.Paul Sokolovsky
Done in generalized manner, allowing any stream class to be specified as working with bytes.
2014-05-14objstr.c: Partial implementation of .rsplit().Paul Sokolovsky
sep=None is TODO.
2014-05-13py: Improve mpz_and function.Damien George
This should now have correct (and optimal) behaviour.
2014-05-13py, unix: Add copyright for modules I worked closely on.Paul Sokolovsky
2014-05-12py: Fix bug in mpz_and function.Damien George
Addresses issue #610.
2014-05-12py: Remove emit_glue init and deinit. Needed only for debugging.Damien George
Debugging output for emit_glue now simplified so that the init and deinit functions are no longer needed.
2014-05-12py: Add support for __debug__ constant.Damien George
__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.
2014-05-12py: Rename BYTE_CODE to BYTECODE (this was missed in previous rename).Damien George
2014-05-12modstruct: Implement count specifier for strings (e.g. "100s").Paul Sokolovsky
Infra for counts of other types is there, need last mile to be implemented.
2014-05-12Fix some unused variables, and silence a clang warning about initialization ↵Antonin ENFRUN
override in vmentrytable.h
2014-05-12unix: Create __bss_start and _end symbols for Mach-O targets.Antonin ENFRUN
It's a hack, but can't find a cleaner way to do it.
2014-05-11modstruct: Use MP_OBJ_FUN_ARGS_MAX instead of -1.Paul Sokolovsky
2014-05-11objstr: Slice indexing: support bytes properly.Paul Sokolovsky
2014-05-11objstr: Make .split() support bytes.Paul Sokolovsky
2014-05-11objstr: Make .join() support bytes.Paul Sokolovsky
2014-05-11py: Fix __len__ special method result handling.Paul Sokolovsky
Having both MP_OBJ_NOT_SUPPORTED and MP_OBJ_NULL is arguably confusing.
2014-05-11py: Don't expect that type->getiter() always returns iterator, check for NULL.Paul Sokolovsky
This is better than forcing each getiter() implementation to raise exception.
2014-05-11showbc: Decode MAP_ADD.Paul Sokolovsky
2014-05-11py: Add basic implementation of hasattr() function.Paul Sokolovsky
2014-05-11py: Use mp_arg_check_num in more places.Damien George
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.
2014-05-11py: frozenset() creates an empty frozenset.Damien George
2014-05-11py: Rename globally-accessible tuple functions, prefix with mp_obj_.Damien George
Likely there are other functions that should be renamed, but this is a start.