1. 04 Jun, 2015 1 commit
  2. 03 Jun, 2015 1 commit
  3. 31 May, 2015 1 commit
  4. 30 May, 2015 4 commits
  5. 28 May, 2015 2 commits
  6. 25 May, 2015 1 commit
  7. 24 May, 2015 1 commit
  8. 21 May, 2015 1 commit
  9. 20 May, 2015 2 commits
  10. 17 May, 2015 5 commits
  11. 13 May, 2015 1 commit
  12. 12 May, 2015 2 commits
    • Damien George's avatar
      py: Add mp_obj_get_int_truncated and use it where appropriate. · c50772d1
      Damien George authored
      mp_obj_get_int_truncated will raise a TypeError if the argument is not
      an integral type.  Use mp_obj_int_get_truncated only when you know the
      argument is a small or big int.
      c50772d1
    • Damien George's avatar
      py: Convert hash API to use MP_UNARY_OP_HASH instead of ad-hoc function. · c2a4e4ef
      Damien George authored
      Hashing is now done using mp_unary_op function with MP_UNARY_OP_HASH as
      the operator argument.  Hashing for int, str and bytes still go via
      fast-path in mp_unary_op since they are the most common objects which
      need to be hashed.
      
      This lead to quite a bit of code cleanup, and should be more efficient
      if anything.  It saves 176 bytes code space on Thumb2, and 360 bytes on
      x86.
      
      The only loss is that the error message "unhashable type" is now the
      more generic "unsupported type for __hash__".
      c2a4e4ef
  13. 11 May, 2015 3 commits
  14. 10 May, 2015 1 commit
  15. 09 May, 2015 2 commits
    • Paul Sokolovsky's avatar
      runtime: Add TODO for mp_resume() on handling .close(). · 4a60cac9
      Paul Sokolovsky authored
      Exceptions in .close() should be ignored (dumped to sys.stderr, not
      propagated), but in uPy, they are propagated. Fix would require
      nlr-wrapping .close() call, which is expensive. Bu on the other hand,
      .close() is not called often, so maybe that's not too bad (depends,
      if it's finally called and that causes stack overflow, there's nothing
      good in that). And yet on another hand, .close() can be implemented to
      catch exceptions on its side, and that should be the right choice.
      4a60cac9
    • Paul Sokolovsky's avatar
      py: iternext() may not return MP_OBJ_NULL, only MP_OBJ_STOP_ITERATION. · 4ed7b7f7
      Paul Sokolovsky authored
      Testing for incorrect value led to premature termination of generator
      containing yield from for such iterator (e.g. "yield from [1, 2]").
      4ed7b7f7
  16. 08 May, 2015 1 commit
  17. 06 May, 2015 4 commits
  18. 05 May, 2015 3 commits
  19. 04 May, 2015 4 commits