1. 08 May, 2015 2 commits
  2. 07 May, 2015 1 commit
  3. 04 May, 2015 2 commits
  4. 01 May, 2015 1 commit
  5. 28 Apr, 2015 2 commits
  6. 25 Apr, 2015 1 commit
  7. 16 Apr, 2015 1 commit
    • Damien George's avatar
      py: Overhaul and simplify printf/pfenv mechanism. · 7f9d1d6a
      Damien George authored
      Previous to this patch the printing mechanism was a bit of a tangled
      mess.  This patch attempts to consolidate printing into one interface.
      
      All (non-debug) printing now uses the mp_print* family of functions,
      mainly mp_printf.  All these functions take an mp_print_t structure as
      their first argument, and this structure defines the printing backend
      through the "print_strn" function of said structure.
      
      Printing from the uPy core can reach the platform-defined print code via
      two paths: either through mp_sys_stdout_obj (defined pert port) in
      conjunction with mp_stream_write; or through the mp_plat_print structure
      which uses the MP_PLAT_PRINT_STRN macro to define how string are printed
      on the platform.  The former is only used when MICROPY_PY_IO is defined.
      
      With this new scheme printing is generally more efficient (less layers
      to go through, less arguments to pass), and, given an mp_print_t*
      structure, one can call mp_print_str for efficiency instead of
      mp_pr...
      7f9d1d6a
  8. 10 Apr, 2015 1 commit
  9. 09 Apr, 2015 1 commit
  10. 06 Apr, 2015 2 commits
  11. 03 Apr, 2015 1 commit
    • Paul Sokolovsky's avatar
      objstr: Add .splitlines() method. · ac2f7a7f
      Paul Sokolovsky authored
      splitlines() occurs ~179 times in CPython3 standard library, so was
      deemed worthy to implement. The method has subtle semantic differences
      from just .split("\n"). It is also defined as working for any end-of-line
      combination, but this is currently not implemented - it works only with
      LF line-endings (which should be OK for text strings on any platforms,
      but not OK for bytes).
      ac2f7a7f
  12. 02 Apr, 2015 1 commit
  13. 26 Mar, 2015 1 commit
  14. 22 Mar, 2015 1 commit
  15. 21 Mar, 2015 1 commit
  16. 20 Mar, 2015 4 commits
  17. 19 Mar, 2015 1 commit
  18. 14 Mar, 2015 1 commit
  19. 13 Mar, 2015 1 commit
  20. 03 Mar, 2015 1 commit
  21. 01 Mar, 2015 1 commit
  22. 27 Feb, 2015 1 commit
    • Paul Sokolovsky's avatar
      objarray: Implement array slice assignment. · cefcbb22
      Paul Sokolovsky authored
      This is rarely used feature which takes enough code to implement, so is
      controlled by MICROPY_PY_ARRAY_SLICE_ASSIGN config setting, default off.
      But otherwise it may be useful, as allows to update arbitrary-sized data
      buffers in-place.
      
      Slice is yet to implement, and actually, slice assignment implemented in
      such a way that RHS of assignment should be array of the exact same item
      typecode as LHS. CPython has it more relaxed, where RHS can be any sequence
      of compatible types (e.g. it's possible to assign list of int's to a
      bytearray slice).
      
      Overall, when all "slice write" features are implemented, it may cost ~1KB
      of code.
      cefcbb22
  23. 25 Feb, 2015 1 commit
  24. 22 Feb, 2015 1 commit
  25. 10 Feb, 2015 1 commit
  26. 07 Feb, 2015 1 commit
    • Damien George's avatar
      py: Protect mp_parse and mp_compile with nlr push/pop block. · 0bfc7638
      Damien George authored
      To enable parsing constants more efficiently, mp_parse should be allowed
      to raise an exception, and mp_compile can already raise a MemoryError.
      So these functions need to be protected by an nlr push/pop block.
      
      This patch adds that feature in all places.  This allows to simplify how
      mp_parse and mp_compile are called: they now raise an exception if they
      have an error and so explicit checking is not needed anymore.
      0bfc7638
  27. 05 Feb, 2015 1 commit
  28. 30 Jan, 2015 1 commit
  29. 29 Jan, 2015 1 commit
  30. 24 Jan, 2015 1 commit
  31. 21 Jan, 2015 1 commit
  32. 20 Jan, 2015 2 commits