Damien George
eae16445d5
py: Implement staticmethod and classmethod (internally).
...
Still need to make built-ins by these names, and write tests.
2014-01-11 19:22:29 +00:00
Damien George
004cdcebfe
py: Implement base class lookup, issubclass, isinstance.
2014-01-09 21:43:51 +00:00
Damien George
062478e66d
Improved type/class/instance code; mp_obj_type_t now has load_attr, store_attr.
...
Creating of classes (types) and instances is much more like CPython now.
You can use "type('name', (), {...})" to create classes.
2014-01-09 20:57:50 +00:00
Damien George
93a9b5b64d
py: Proper framework for built-in 'type'.
2014-01-08 18:48:12 +00:00
Damien George
97209d38e1
Merge branch 'cplusplus' of https://github.com/ian-v/micropython into ian-v-cplusplus
...
Conflicts:
py/objcomplex.c
2014-01-07 15:58:30 +00:00
ian-v
7a16fadbf8
Co-exist with C++ (issue #85 )
2014-01-06 09:52:29 -08:00
Paul Sokolovsky
860ffb0a43
Convert many object types structs to use C99 tagged initializer syntax.
2014-01-05 22:34:09 +02:00
Damien George
71c5181a8d
Convert Python types to proper Python type hierarchy.
...
Now much more inline with how CPython does types.
2014-01-04 20:21:15 +00:00
Damien George
40563d56bd
py: Add framework for built-in "type()" function.
2014-01-02 16:01:17 +00:00
Damien
d99b05282d
Change object representation from 1 big union to individual structs.
...
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).
2013-12-21 18:17:45 +00:00