[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: isa strangeness
From: |
Martin Helm |
Subject: |
Re: isa strangeness |
Date: |
Mon, 16 Aug 2010 11:34:12 +0200 |
User-agent: |
KMail/1.13.5 (Linux/2.6.31.12-0.2-desktop; KDE/4.4.4; x86_64; ; ) |
Am Montag, 16. August 2010, 09:02:19 schrieb Jaroslav Hajek:
> On Mon, Aug 16, 2010 at 8:50 AM, Martin Helm <address@hidden> wrote:
> > Am Montag, 16. August 2010, 08:10:47 schrieb Jaroslav Hajek:
> >> On Mon, Aug 16, 2010 at 4:31 AM, Martin Helm <address@hidden> wrote:
> >> > The help string of isa is not really good here.
> >> > Use
> >> > isa(10, "double") or isa(10, 'double')
> >> > class in isa is expected to be a string here which contains the class
> >> > name. The reason is the syntax
> >> > isa(10, double)
> >> > will treat double as a function call without arguments, which is a
> >> > syntax error.
> >> > - mh
> >>
> >> On the contrary, I think that the help string is OK, It's just that
> >> Richard doesn't understand the fundamentals of Octave syntax; but we
> >> surely can't repeat those in every docstring, can we?
> >
> > I try to think like someone who never has used octave or matlab here
> > (and I think he mentioned that in an indirect way by stating that he
> > installed yesterday octave and works through the manual).
>
> Yes, most likely that's why he doesn't understand. I wasn't implying
> anything about Richard's mental capabilities or whatever else.
>
> > And if I read the output of "help isa" it is not clear (for me it was ,
> > but probably simply because I am used to it and never think about that)
> > that CLASS is a name (in fact looking at the code with "type isa" the
> > same input variable is called cname in the code which is much more
> > descriptive).
>
> What else can CLASS be? The example Richard tried
>
> isa (10, double)
>
> makes no sense because an unquoted non-keyword plain literal in Octave
> implies either a variable query or, if no such variable exists, a
> function/class call. *CALL*, not reference. It's obvious that you
> don't want a call here.
> The next example
>
> isa (10, double(10))
>
> makes even less sense. Only the final one was correct, albeit not
> useful. I still think the docstring is OK, although you're welcome to
> improve it. Octave simply treats name somewhat differently than, say,
> Python, but once you learn how, it makes sense.
>
> regards
That's the rason why I made an explanation for every of the wrong attempts he
made.
I have no practicable proposal howto improve the doc strings (otherwise it is
too redundant at many places).
- mh
- isa strangeness, Richard E. Harke, 2010/08/15
- Re: isa strangeness, Martin Helm, 2010/08/15
- Re: isa strangeness, Jaroslav Hajek, 2010/08/16
- Re: isa strangeness, Martin Helm, 2010/08/16
- Re: isa strangeness, Jaroslav Hajek, 2010/08/16
- Re: isa strangeness,
Martin Helm <=
- Re: isa strangeness, Michael Goffioul, 2010/08/16
- Re: isa strangeness, Martin Helm, 2010/08/16
- Re: isa strangeness, Michael Goffioul, 2010/08/16
- Re: isa strangeness, Martin Helm, 2010/08/16
- Re: isa strangeness, Richard E. Harke, 2010/08/16
- Re: isa strangeness, Martin Helm, 2010/08/16
- Re: isa strangeness, Francesco Potortì, 2010/08/16
Re: isa strangeness, Martin Helm, 2010/08/15