1. 01 Jun, 2014 1 commit
    • Damien George's avatar
      Rename bultins config variables to MICROPY_PY_BUILTINS_*. · fb510b3b
      Damien George authored
      This renames:
      See issue #35 for discussion.
  2. 24 May, 2014 1 commit
  3. 21 May, 2014 4 commits
  4. 19 May, 2014 1 commit
    • Paul Sokolovsky's avatar
      objtype: Separate __new__ and __init__ methods. · 13684fd6
      Paul Sokolovsky authored
      Now schedule is: for native types, we call ->make_new() C-level method, which
      should perform actions of __new__ and __init__ (note that this is not
      compliant, but is efficient), but for user types, __new__ and __init__ are
      called as expected.
      Also, make sure we convert scalar attribute value to a bound-pair tight in
      mp_obj_class_lookup() method, which avoids converting it again and again in
      its callers.
  5. 13 May, 2014 1 commit
  6. 11 May, 2014 3 commits
    • Damien George's avatar
      py: Use mp_arg_check_num in more places. · ee7a880d
      Damien George authored
      Updated functions now do proper checking that n_kw==0, and are simpler
      because they don't have to explicitly raise an exception.  Down side is
      that the error messages no longer include the function name, but that's
      Saves order 300 text bytes on x64 and ARM.
    • 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.
    • Paul Sokolovsky's avatar
      py: Don't try to "bind" types store as attributes of objects. · 9511f60f
      Paul Sokolovsky authored
      This was hit when trying to make urlparse.py from stdlib run. Took
      quite some time to debug.
      TODO: Reconsile bound method creation process better, maybe callable is
      to generic type to bind at all?
  7. 10 May, 2014 4 commits
  8. 03 May, 2014 2 commits
  9. 02 May, 2014 2 commits
  10. 01 May, 2014 2 commits
  11. 29 Apr, 2014 3 commits
  12. 25 Apr, 2014 1 commit
  13. 21 Apr, 2014 1 commit
  14. 17 Apr, 2014 2 commits
  15. 14 Apr, 2014 1 commit
  16. 13 Apr, 2014 1 commit
  17. 08 Apr, 2014 2 commits
  18. 05 Apr, 2014 3 commits
  19. 02 Apr, 2014 1 commit
  20. 31 Mar, 2014 3 commits
    • Damien George's avatar
      py: Implement __getattr__. · e44d26ae
      Damien George authored
      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.
    • Paul Sokolovsky's avatar
      objtype: Wrap .__name__ handling in MICROPY_CPYTHON_COMPAT. · b509f739
      Paul Sokolovsky authored
      Because it's runtime reflection feature, not required for many apps.
      Rant time:
      Python could really use better str() vs repr() distinction, for example,
      repr(type) could be "<class 'foo'>" (as it is now), and str(type) just
      "foo". But alas, getting straight name requires adhoc attribute.
    • Paul Sokolovsky's avatar
      objtype: Add virtual __name__ attribute. · e5666701
      Paul Sokolovsky authored
      It's virtual because it's not shown in dir(...). (That's also how CPython
      has it).
  21. 30 Mar, 2014 1 commit
    • Damien George's avatar
      Merge map.h into obj.h. · df6567e6
      Damien George authored
      Pretty much everyone needs to include map.h, since it's such an integral
      part of the Micro Python object implementation.  Thus, the definitions
      are now in obj.h instead.  map.h is removed.