summaryrefslogtreecommitdiffstatshomepage
path: root/py/builtin.h
Commit message (Collapse)AuthorAge
* py: Make built-in 'range' a class.Damien George2014-04-17
| | | | Addresses issue #487.
* py: Add cmath module, for complex math. Disabled by default.Damien George2014-04-17
| | | | Not all functions implemented. Not enabled on pyboard.
* py: Add builtin functions bin and oct, and some tests for them.Damien George2014-04-15
|
* py: Add hex builtin function.Damien George2014-04-15
| | | | A one-liner, added especially for @pfalcon :)
* objdict: Add __delitem__.Paul Sokolovsky2014-04-13
|
* objdict: Add __setitem__.Paul Sokolovsky2014-04-13
|
* Merge pull request #476 from pfalcon/static-sysDamien George2014-04-13
|\ | | | | Convert sys module to static allocation
| * py, unix: Convert sys module to static representation.Paul Sokolovsky2014-04-13
| |
* | py: Factor out impl of special methods for builtin types into opmethods.cPaul Sokolovsky2014-04-13
|/
* py: Start implementing "struct" module.Paul Sokolovsky2014-04-10
| | | | | | | | | Only calcsize() and unpack() functions provided so far, for little-endian byte order. Format strings don't support repition spec (like "2b3i"). Unfortunately, dealing with all the various binary type sizes and alignments will lead to quite a bloated "binary" helper functions - if optimizing for speed. Need to think if using dynamic parametrized algos makes more sense.
* py: Implement globals() and locals() builtins.Paul Sokolovsky2014-04-06
|
* py: Put default namespace into module __main__.Paul Sokolovsky2014-04-05
| | | | That's how CPython has it, in particular, "import __main__" should work.
* py: Add "io" module.Paul Sokolovsky2014-04-03
| | | | | | So far just includes "open" function, which should be supplied by a port. TODO: Make the module #ifdef'ed.
* py: Implement getattr() builtin.Paul Sokolovsky2014-03-27
|
* Proper support for registering builtin modules in ROM.Damien George2014-03-25
| | | | | Comes with some refactoring of code and renaming of files. All modules are now named mod*.[ch].
* py: Remove obsolete declarations; make mp_obj_get_array consistent.Damien George2014-03-24
|
* Implement ROMable modules. Add math module.Damien George2014-03-08
| | | | | | | | | | mp_module_obj_t can now be put in ROM. Configuration of float type is now similar to longint: can now choose none, float or double as the implementation. math module has basic math functions. For STM port, these are not yet implemented (they are just stub functions).
* Add basic collections.namedtuple implementation.Paul Sokolovsky2014-03-03
|
* Expose __import__() function.Paul Sokolovsky2014-02-04
|
* py: Implement builtin exec.Damien George2014-02-03
|
* py: Add very basic implementation of dir() builtin.Damien George2014-02-02
| | | | Only works on modules and class instances.
* Implement and add tests for the id() builtin function.xbe2014-02-01
|
* Add dummy bytes() constructor.Paul Sokolovsky2014-01-20
| | | | | | Currently, MicroPython strings are mix between CPython byte and unicode strings. So, conversion is null so far. This dummy implementation is intended for compatibility with CPython (so, same code can run on both).
* py: Put micropython module init code in builtinmp.c.Damien George2014-01-20
|
* Expose memory stats functions via "micropython" module.Paul Sokolovsky2014-01-20
| | | | | | | These are micropython.mem_total(), .mem_current(), .mem_peak(). These are 3 individual functions with simple scalar return value to make sure that calls to these functions themselves have minimal (hopefully zero) impact on memory allocation.
* Merge branch 'str-repr' of github.com:pfalcon/micropython into pfalcon-str-reprDamien George2014-01-15
|\ | | | | | | | | Conflicts: tests/basics/tests/exception1.py
| * Implement str() and repr() builtin functions.Paul Sokolovsky2014-01-15
| |
* | Implement eval.Damien George2014-01-15
| |
* | Implement repr.Damien George2014-01-15
|/
* Merge remote-tracking branch 'upstream/master' into builtinsJohn R. Lenton2014-01-13
|\ | | | | | | | | | | | | Conflicts: py/builtin.c py/builtin.h py/runtime.c
| * Cleanup built-ins, and fix some compiler warnings/errors.Damien George2014-01-13
| |
* | sortedJohn R. Lenton2014-01-13
|/
* py: Implement base class lookup, issubclass, isinstance.Damien George2014-01-09
|
* py: Improve __build_class__.Damien George2014-01-08
|
* py: Add framework for built-in "type()" function.Damien George2014-01-02
|
* py: add int() and float() built-ins, partially implemented.Damien George2014-01-01
|
* Change object representation from 1 big union to individual structs.Damien2013-12-21
| | | | | | | | | | A big change. Micro Python objects are allocated as individual structs with the first element being a pointer to the type information (which is itself an object). This scheme follows CPython. Much more flexible, not necessarily slower, uses same heap memory, and can allocate objects statically. Also change name prefix, from py_ to mp_ (mp for Micro Python).
* py: add more Python built-in functions.Damien2013-12-17
|
* py: split runtime into map, obj, builtin.Damien2013-12-17