summaryrefslogtreecommitdiff
path: root/py/qstrdefs.h
AgeCommit message (Collapse)Author
2014-04-21py: Add 'align' and 'data' meta-instructions to inline assembler.Damien George
2014-04-19modstruct: Initial implementation of struct.pack().Paul Sokolovsky
2014-04-17py: Add cmath module, for complex math. Disabled by default.Damien George
Not all functions implemented. Not enabled on pyboard.
2014-04-15py: Add builtin functions bin and oct, and some tests for them.Damien George
2014-04-15py: Fix builtin hex to print prefix.Damien George
I was too hasty. Still a one-liner though.
2014-04-15py: Add hex builtin function.Damien George
A one-liner, added especially for @pfalcon :)
2014-04-14modsys: 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-13objdict: Add __delitem__.Paul Sokolovsky
2014-04-13py: Add property object, with basic functionality.Damien George
Enabled by MICROPY_ENABLE_PROPERTY.
2014-04-13modsys: Implement sys.byteorder.Paul Sokolovsky
2014-04-13modsys: Implement basic sys.version_info.Paul Sokolovsky
2014-04-13Merge pull request #476 from pfalcon/static-sysDamien George
Convert sys module to static allocation
2014-04-13objset: Implement __contains__() op-method.Paul Sokolovsky
2014-04-13py: 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-13py: Move sys attribute qstrs's to core.Paul Sokolovsky
2014-04-13objstr: 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-12builtinimport: 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-12py: 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-10py: 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-09Merge branch 'str-index' of github.com:xbe/micropython into xbe-str-indexDamien George
2014-04-09objint: 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-08py: Implement str.[r]index() and add tests for them.xbe
2014-04-05Merge branch 'master' of github.com:micropython/micropythonDamien George
2014-04-05py: 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-06py: Implement globals() and locals() builtins.Paul Sokolovsky
2014-04-05Merge pull request #425 from iabdalkader/delDamien George
Implement del
2014-04-05Move del to localsmux
2014-04-03py: 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-02py: Add support for sep and end keywords in print.Damien George
2014-03-31py: 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-29vm: Implement "with" statement (SETUP_WITH and WITH_CLEANUP bytecodes).Paul Sokolovsky
2014-03-27py: Implement getattr() builtin.Paul Sokolovsky
2014-03-26Change mp_method_t.name from const char * to qstr.Damien George
Addresses issue #377.
2014-03-26py: Add support for user-defined iterators via __iter__, __next__.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-25objexcept: Add "args" exception attribute, as well as StopIteration.value.Paul Sokolovsky
2014-03-22py: Remove some unnecessary exception objects.Damien George
2014-03-22py: Add 'object' object.Damien George
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-20Added ZeroDivisionError to float division.Rachel Dowdall
2014-03-20Added various simple functions to math module.Rachel Dowdall
2014-03-20py: Add math.e constant.Damien George
2014-03-16Implement support for __str__ and __repr__ special methods in classes.Paul Sokolovsky
2014-03-12py: Add expm1 to math module.Damien George
2014-03-08Implement 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-03Add basic collections.namedtuple implementation.Paul Sokolovsky
2014-02-15Implement 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-15Change 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-10Merge branch 'master' of github.com:micropython/micropythonDamien George