[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #50752] inputParser Parameter key are parsed a
From: |
Carnë Draug |
Subject: |
[Octave-bug-tracker] [bug #50752] inputParser Parameter key are parsed as Optional |
Date: |
Fri, 7 Apr 2017 13:53:34 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0 |
Update of bug #50752 (project octave):
Summary: test failure for inputParser => inputParser
Parameter key are parsed as Optional
_______________________________________________________
Follow-up Comment #2:
> It seems reasonable to me to stop processing optional parameters as soon as
a name/value pair is recognized. Is there some reason not to do that?
The name of a parameter can also be a valid value for a positional option.
Since positional options must come first, if a value is a valid positional
option, then it should be treated as such instead as key/value pair. Consider
this case:
p = inputParser ();
p.addOptional ("op1", "val1")
p.addOptional ("op2", "val2")
p.addParameter ("line", "tree")
p.parse ("line", "circle")
p.Results ()
Should op1 and op2 should be set to line and circle respectively, and line be
set to the default value of tree? Or should op1 and op2 be set to their
default values and line be set to circle?
I think the current behaviour is the most logical since positional options
should be all be processed before trying to match key value parameters. But I
guess we need to do whatever Matlab does. What does Matlab do?
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?50752>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #50752] test failure for inputParser, John W. Eaton, 2017/04/07
- [Octave-bug-tracker] [bug #50752] test failure for inputParser, John W. Eaton, 2017/04/07
- [Octave-bug-tracker] [bug #50752] inputParser Parameter key are parsed as Optional,
Carnë Draug <=
- [Octave-bug-tracker] [bug #50752] inputParser Parameter key are parsed as Optional, John W. Eaton, 2017/04/07
- [Octave-bug-tracker] [bug #50752] inputParser Parameter key are parsed as Optional, A.R. Burgers, 2017/04/08
- [Octave-bug-tracker] [bug #50752] inputParser Parameter key are parsed as Optional, Carnë Draug, 2017/04/09
- [Octave-bug-tracker] [bug #50752] inputParser Parameter key are parsed as Optional, A.R. Burgers, 2017/04/09
- [Octave-bug-tracker] [bug #50752] inputParser Parameter key are parsed as Optional, Carnë Draug, 2017/04/10
- [Octave-bug-tracker] [bug #50752] inputParser Parameter key are parsed as Optional, Carnë Draug, 2017/04/10