[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Suggestion on priorities for improving pytave
From: |
Mike Miller |
Subject: |
Re: Suggestion on priorities for improving pytave |
Date: |
Thu, 7 Jul 2016 09:44:17 -0700 |
User-agent: |
Mutt/1.6.0 (2016-04-01) |
On Thu, Jul 07, 2016 at 21:52:55 +0530, Abhinav Tripathi wrote:
> On Jul 7, 2016 1:01 PM, "Colin Macdonald" <address@hidden> wrote:
> >
> >
> > At least for now, I think you're right.
> >
> >
> >> pystore ("var_with_req_name", req_octave_value);
> >
> >
> > Its possible that we don't want to expose such a thing (although we may
> want it internally).
> >
> > Why? We don't really want the user to have to track a mental model of
> variables in Python space. She should just have some Octave objects
> (doubles, strings) and some @pyobjects (dicts, modules, whatever). And
> then do things to those objects.
> >
>
> Ohk. I understand. But still, if it an extra feature and we don't let the
> user rely on it. It can be helpful?!
I agree with Colin, and at least for now I think it would be best if we
try to use the Python interface the way we want users to use it
(dogfooding).
If it becomes obvious that this is a needed feature then we could add
it. But I hope that we can get to the point where we don't need to
assign names to values in Python at all, and just use pyobjects.
> >> Maybe some kind of support for function kwargs as well? A scalar
> struct
> >> to pass named parameters?
> >>
> >> This could prove to be a bit tricky. I tried but couldn't use map
> >> unpacking to call a python function.
> >
> >
> > Please file an issue for this kwargs stuff. It'll be important, even if
> we can't do it right now.
> >
> > Colin
>
> Oh sorry. I think I missed kwargs thing and only remembered scalar struct
> thing.
> I have used/created functions with variable arguments in c++ but never in
> python. I see how to do that.
> I'll file an issues on bitbucket.
Thanks. I think the first step would be just discussing what kind of
Octave syntax we want to use to be able to pass named parameters to
Python functions, I threw out the idea of a scalar struct with
name/value pairs, but maybe other ideas?
--
mike