1. 12 Aug, 2014 1 commit
    • Damien George's avatar
      py: Implement builtin reversed() function. · 4c03b3a8
      Damien George authored
      reversed function now implemented, and works for tuple, list, str, bytes
      and user objects with __len__ and __getitem__.
      
      Renamed mp_builtin_len to mp_obj_len to make it publically available (eg
      for reversed).
      4c03b3a8
  2. 10 Aug, 2014 1 commit
  3. 31 Jul, 2014 2 commits
  4. 27 Jul, 2014 1 commit
  5. 25 Jul, 2014 1 commit
    • Dave Hylands's avatar
      Add support for storing args during an exception raised by an irq. · 5b7fd20f
      Dave Hylands authored
      The user code should call micropython.alloc_emergency_exception_buf(size)
      where size is the size of the buffer used to print the argument
      passed to the exception.
      
      With the test code from #732, and a call to
      micropython.alloc_emergenncy_exception_buf(100) the following error is
      now printed:
      ```python
      >>> import heartbeat_irq
      Uncaught exception in Timer(4) interrupt handler
      Traceback (most recent call last):
        File "0://heartbeat_irq.py", line 14, in heartbeat_cb
      NameError: name 'led' is not defined
      ```
      5b7fd20f
  6. 03 Jul, 2014 1 commit
  7. 13 Jun, 2014 1 commit
    • Paul Sokolovsky's avatar
      objstr: Be 8-bit clean even for repr(). · 2ec38a17
      Paul Sokolovsky authored
      This will allow roughly the same behavior as Python3 for non-ASCII strings,
      for example, print("<phrase in non-Latin script>".split()) will print list
      of words, not weird hex dump (like Python2 behaves). (Of course, that it
      will print list of words, if there're "words" in that phrase at all, separated
      by ASCII-compatible whitespace; that surely won't apply to every human
      language in existence).
      2ec38a17
  8. 11 Jun, 2014 1 commit
  9. 07 Jun, 2014 2 commits
  10. 05 Jun, 2014 1 commit
  11. 01 Jun, 2014 2 commits
  12. 28 May, 2014 2 commits
  13. 25 May, 2014 3 commits
  14. 24 May, 2014 3 commits
  15. 21 May, 2014 1 commit
  16. 17 May, 2014 1 commit
  17. 15 May, 2014 1 commit
  18. 11 May, 2014 2 commits
    • Damien George's avatar
      py: Rename globally-accessible tuple functions, prefix with mp_obj_. · 2323ef91
      Damien George authored
      Likely there are other functions that should be renamed, but this is a
      start.
      2323ef91
    • Paul Sokolovsky's avatar
      objtuple: Go out of the way to support comparison of subclasses. · ea970809
      Paul Sokolovsky authored
      Two things are handled here: allow to compare native subtypes of tuple,
      e.g. namedtuple (TODO: should compare type too, currently compared
      duck-typedly by content). Secondly, allow user sunclasses of tuples
      (and its subtypes) be compared either. "Magic" I did previously in
      objtype.c covers only one argument (lhs is many), so we're in trouble
      when lhs is native type - there's no other option besides handling
      rhs in special manner. Fortunately, this patch outlines approach with
      fast path for native types.
      ea970809
  19. 10 May, 2014 5 commits
  20. 07 May, 2014 1 commit
  21. 03 May, 2014 2 commits
  22. 01 May, 2014 2 commits
  23. 27 Apr, 2014 2 commits
  24. 26 Apr, 2014 1 commit