summaryrefslogtreecommitdiff
path: root/py
AgeCommit message (Collapse)Author
2014-03-26py: Swap around the double return value of mp_obj_gen_resume.Damien George
Just to keep things consistent :)
2014-03-26py: Replace mp_const_stop_iteration object with MP_OBJ_NULL.Damien George
2014-03-26Merge pull request #379 from pfalcon/reraiseDamien George
vm: Implement raise statement w/o args (reraising last exception).
2014-03-26Merge branch 'master' of github.com:micropython/micropythonDamien George
2014-03-26py: Use _is_subclass_fast instead of _exception_match.Damien George
2014-03-26Merge branch 'gen-close-ret-val' of github.com:pfalcon/micropython into ↵Damien George
pfalcon-gen-close-ret-val
2014-03-26py: Add support for user-defined iterators via __iter__, __next__.Damien George
2014-03-26objexcept: Add mp_obj_exception_get_value() convenience function.Paul Sokolovsky
This gets "value" of exceptions in the sense as it's defined for StopIteration.value (i.e. args[0] or None). TODO: This really should be inline function.
2014-03-26vm: Implement raise statement w/o args (reraising last exception).Paul Sokolovsky
2014-03-26objgenerator: Implement return with value and .close() method.Paul Sokolovsky
Return with value gets converted to StopIteration(value). Implementation keeps optimizing against creating of possibly unneeded exception objects, so there're considerable refactoring to implement these features.
2014-03-25Merge pull request #370 from xbe/str-rfindDamien George
py/objstr.c: Implement str.rfind() and add tests for it, refactor find_subbytes().
2014-03-25py: Replace naive and teribble hash function with djb2.Damien George
2014-03-25py: Removed some unnecessary exception objects.Damien George
They still exist in commented-out form in objexcept.c if they are ever needed.
2014-03-25Proper support for registering builtin modules in ROM.Damien George
Comes with some refactoring of code and renaming of files. All modules are now named mod*.[ch].
2014-03-25Merge pull request #373 from iabdalkader/module_registerDamien George
Add mp_obj_module_register
2014-03-25objexcept: Add "args" exception attribute, as well as StopIteration.value.Paul Sokolovsky
2014-03-25rt_load_method(): Add missing qstr_str() when getting type name.Paul Sokolovsky
2014-03-25Add mp_obj_module_registermux
* Add function to load static modules. * Use module_register to pyb module.
2014-03-24Merge branch 'master' of github.com:micropython/micropythonDamien George
2014-03-24py: Remove obsolete declarations; make mp_obj_get_array consistent.Damien George
2014-03-24Implement str.rfind() and add tests for it.xbe
2014-03-23py/objstr.c: Remove done TODOs.xbe
2014-03-23py: Implement support for "except Exception as var" clause.Paul Sokolovsky
For this, needed to implement DELETE_NAME bytecode (because var bound in except clause is automatically deleted at its end). http://docs.python.org/3/reference/compound_stmts.html#except : "When an exception has been assigned using as target, it is cleared at the end of the except clause."
2014-03-23runtime: RT_BINARY_OP_EXCEPTION_MATCH: don't fall thru in case of wrong types.Paul Sokolovsky
2014-03-23vm: Abstract working with tagged pointers in VM using macro accessors.Paul Sokolovsky
Based on issues raised during recent review and inconsistency of different implementations.
2014-03-23Merge pull request #365 from xbe/tgammaDamien George
py/builtinmath.c: use tgamma() instead of gamma().
2014-03-23py/builtinmath.c: use tgamma() instead of gamma().xbe
gamma() is now deprecated.
2014-03-22Fix OS X detection.xbe
Switch to checking for the __APPLE__ and __MACH__ macros.
2014-03-23Merge pull request #364 from pfalcon/mpz-unbreak-int-longDamien George
objint_mpz: Quick&dirty implementation of bitwise operations.
2014-03-23py: Improve dir(): extract names from type->methods table.Damien George
2014-03-23objint_mpz: Quick&dirty implementation of bitwise operations.Paul Sokolovsky
Made solely to unbreak int-long.py test which in turn uncovered thinko with implementation of inplace ops. On mpz level, bitwise ops implemented only for same-sign numbers, and are not efficient (unconditional calling of mpn_cmp() is apparently superfluous).
2014-03-22Merge branch 'master' of github.com:micropython/micropythonDamien George
2014-03-22py: Remove some unnecessary exception objects.Damien George
2014-03-22objgenerator: Add comments for latest mp_obj_gen_instance_t refactors.Paul Sokolovsky
2014-03-22py: Add 'object' object.Damien George
2014-03-22py: Add function to convert long int to float.Damien George
2014-03-22py: Fix types in new math functions.Damien George
2014-03-22py: Fix int -> machine_uint_t.Damien George
2014-03-22Merge pull request #360 from rjdowdall/masterDamien George
Fixed some math functions and added more exceptions.
2014-03-22Fixed floor division on mp ints and small ints. Added a floordivide test case.Rachel Dowdall
2014-03-22Merge pull request #359 from rjdowdall/masterDamien George
Fixed some math functions and added more exceptions.
2014-03-22Fixed floor division on mp ints and small ints. Added a floordivide test case.Rachel Dowdall
2014-03-22Fixed modulo operator on ints and mp ints to agree with python. Added ↵Rachel Dowdall
intdivmod.c and tests/basics/modulo.py.
2014-03-22objgenerator: Implement .throw() method to throw exceptions into generator.Paul Sokolovsky
2014-03-22objgenerator: Implement throwing exceptions out of generator.Paul Sokolovsky
2014-03-22objgenerator: Keep exception stack within generator object, like value stack.Paul Sokolovsky
This is required to properly handle exceptions across yields.
2014-03-22Added exception hierarchy except for OSError and UnicodeError (requires ↵Rachel Dowdall
arguments). Comment out the errors that aren't needed if memory becomes an issue.
2014-03-22Fixed broken math functions that return bool and added some more.Rachel Dowdall
2014-03-22Merge remote-tracking branch 'upstream/master'Rachel Dowdall
2014-03-22showbc: Dump YIELD_FROM.Paul Sokolovsky