Age | Commit message (Collapse) | Author | |
---|---|---|---|
2014-04-21 | py: Add 'align' and 'data' meta-instructions to inline assembler. | Damien George | |
2014-04-19 | modstruct: Initial implementation of struct.pack(). | Paul Sokolovsky | |
2014-04-17 | py: Add cmath module, for complex math. Disabled by default. | Damien George | |
Not all functions implemented. Not enabled on pyboard. | |||
2014-04-15 | py: Add builtin functions bin and oct, and some tests for them. | Damien George | |
2014-04-15 | py: Fix builtin hex to print prefix. | Damien George | |
I was too hasty. Still a one-liner though. | |||
2014-04-15 | py: Add hex builtin function. | Damien George | |
A one-liner, added especially for @pfalcon :) | |||
2014-04-14 | modsys: Implement sys.version. | Paul Sokolovsky | |
The logic appears to be that (at least beginning of) sys.versions is the version of reference Python language implemented, not version of particular implementation. Also, bump set versions at 3.4.0, based on @dpgeorge preference. | |||
2014-04-13 | objdict: Add __delitem__. | Paul Sokolovsky | |
2014-04-13 | py: Add property object, with basic functionality. | Damien George | |
Enabled by MICROPY_ENABLE_PROPERTY. | |||
2014-04-13 | modsys: Implement sys.byteorder. | Paul Sokolovsky | |
2014-04-13 | modsys: Implement basic sys.version_info. | Paul Sokolovsky | |
2014-04-13 | Merge pull request #476 from pfalcon/static-sys | Damien George | |
Convert sys module to static allocation | |||
2014-04-13 | objset: Implement __contains__() op-method. | Paul Sokolovsky | |
2014-04-13 | py: Rename collections module to _collections. | Paul Sokolovsky | |
We're not going to implement all the plethora of types in there in C. Funnily, CPython implements defaultdict in C, and namedtuple in Python. | |||
2014-04-13 | py: Move sys attribute qstrs's to core. | Paul Sokolovsky | |
2014-04-13 | objstr: Add str.encode() and bytes.decode() methods. | Paul Sokolovsky | |
These largely duplicate str() & bytes() constructors' functionality, but can be used to achieve Python2 compatibility. | |||
2014-04-12 | builtinimport: Set __path__ attribute on packages. | Paul Sokolovsky | |
Per https://docs.python.org/3.3/reference/import.html , this is the way to tell module from package: "Specifically, any module that contains a __path__ attribute is considered a package." And it for sure will be needed to implement relative imports. | |||
2014-04-12 | py: Preprocess qstrdefs.h before feeding to makeqstrdata.py. | Paul Sokolovsky | |
This is alternative implementation of supporting conditionals in qstrdefs.h, hard to say if it's much cleaner than munging #ifdef's in Python code... | |||
2014-04-10 | py: Start implementing "struct" module. | Paul Sokolovsky | |
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. | |||
2014-04-09 | Merge branch 'str-index' of github.com:xbe/micropython into xbe-str-index | Damien George | |
2014-04-09 | objint: Implement int.from_bytes() class method and .to_bytes() method. | Paul Sokolovsky | |
These two are apprerently the most concise and efficient way to convert int to/from bytes in Python. The alternatives are struct and array modules, but methods using them are more verbose in Python code and less efficient in memory/cycles. | |||
2014-04-08 | py: Implement str.[r]index() and add tests for them. | xbe | |
2014-04-05 | Merge branch 'master' of github.com:micropython/micropython | Damien George | |
2014-04-05 | py: Replace stream_p with *stream_p in mp_obj_type_t. | Damien George | |
This is to reduce ROM usage. stream_p is used in file and socket types only (at the moment), so seems a good idea to make the protocol functions a pointer instead of the actual structure. It saves 308 bytes of ROM in the stmhal/ port, 928 in unix/. | |||
2014-04-06 | py: Implement globals() and locals() builtins. | Paul Sokolovsky | |
2014-04-05 | Merge pull request #425 from iabdalkader/del | Damien George | |
Implement del | |||
2014-04-05 | Move del to locals | mux | |
2014-04-03 | py: Add "io" module. | Paul Sokolovsky | |
So far just includes "open" function, which should be supplied by a port. TODO: Make the module #ifdef'ed. | |||
2014-04-02 | py: Add support for sep and end keywords in print. | Damien George | |
2014-03-31 | py: Implement __getattr__. | Damien George | |
It's not completely satisfactory, because a failed call to __getattr__ should not raise an exception. __setattr__ could be implemented, but it would slow down all stores to a user created object. Need to implement some caching system. | |||
2014-03-29 | vm: Implement "with" statement (SETUP_WITH and WITH_CLEANUP bytecodes). | Paul Sokolovsky | |
2014-03-27 | py: Implement getattr() builtin. | Paul Sokolovsky | |
2014-03-26 | Change mp_method_t.name from const char * to qstr. | Damien George | |
Addresses issue #377. | |||
2014-03-26 | py: Add support for user-defined iterators via __iter__, __next__. | Damien George | |
2014-03-25 | py: Removed some unnecessary exception objects. | Damien George | |
They still exist in commented-out form in objexcept.c if they are ever needed. | |||
2014-03-25 | objexcept: Add "args" exception attribute, as well as StopIteration.value. | Paul Sokolovsky | |
2014-03-22 | py: Remove some unnecessary exception objects. | Damien George | |
2014-03-22 | py: Add 'object' object. | Damien George | |
2014-03-22 | Added 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-22 | Fixed broken math functions that return bool and added some more. | Rachel Dowdall | |
2014-03-20 | Added ZeroDivisionError to float division. | Rachel Dowdall | |
2014-03-20 | Added various simple functions to math module. | Rachel Dowdall | |
2014-03-20 | py: Add math.e constant. | Damien George | |
2014-03-16 | Implement support for __str__ and __repr__ special methods in classes. | Paul Sokolovsky | |
2014-03-12 | py: Add expm1 to math module. | Damien George | |
2014-03-08 | Implement ROMable modules. Add math module. | Damien George | |
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). | |||
2014-03-03 | Add basic collections.namedtuple implementation. | Paul Sokolovsky | |
2014-02-15 | Implement proper exception type hierarchy. | Damien George | |
Each built-in exception is now a type, with base type BaseException. C exceptions are created by passing a pointer to the exception type to make an instance of. When raising an exception from the VM, an instance is created automatically if an exception type is raised (as opposed to an exception instance). Exception matching (RT_BINARY_OP_EXCEPTION_MATCH) is now proper. Handling of parse error changed to match new exceptions. mp_const_type renamed to mp_type_type for consistency. | |||
2014-02-15 | Change mp_obj_type_t.name from const char * to qstr. | Damien George | |
Ultimately all static strings should be qstr. This entry in the type structure is only used for printing error messages (to tell the type of the bad argument), and printing objects that don't supply a .print method. | |||
2014-02-10 | Merge branch 'master' of github.com:micropython/micropython | Damien George | |