pyobject: support callables with arguments

#18 Declined
  1. Colin Macdonald

also, pycall can return None, part of #31.

In case my later commits mess this up, this PR is intended to be the bookmark "cbm_fix18"

  • Issues #31: reference to None? resolved

Comments (8)

  1. Mike Miller repo owner

    Did you mean to include b8a7afd in this PR? If so I can comment on it (and I do have some comments), but if not would you mind rebasing aecb269 so I can merge it?

    1. Colin Macdonald author

      Yes I meant to. I need None back from pycall, c.f., our discussion earlier today about varargout. Without a None return, r = pycall(...) doesn't work (I forget the exact error, but basically that there is no return value to assign).

      In an earlier iteration, I tried:

      if (nargout == 0)
        pycall (...)
       r = pycall (...)

      but that won't work because I'll never assign to ans...

  2. Colin Macdonald author

    10 min change, 15 mins histedit (read about phase), 20 mins to force changes (strip through webgui settings). Still not a huge fan of this workflow (hg part seems fine, but bitbucket not designed to deal with bookmarks IMHO).

  3. Colin Macdonald author

    I think this is now the revised version. Happily "ans" now seems to work the same as "_" which is great!

  4. Colin Macdonald author

    rebased again as I missed a change: pycall and subsref have essentially duplicated code for dealing with outputs. I think this is ok for now.

  5. Colin Macdonald author

    I think we've seen this before, but this gui does not correctly track the bookmark. This PR is supposed to be cbm_fix18. Please ignore changes to subsasgn when reviewing.