bugGNU Octave - Bugs: bug #66884, Improve "help" message...

 
 

bug #66884: Improve "help" message if 'method' exists in multiple classes

Submitter:  Dmitri A. Sergatskov <dasergatskov>
Submitted:  Sat 08 Mar 2025 08:04:32 PM UTC
   
 
Category:  Octave Function Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Inaccurate Result
Status:  Patch Submitted Assigned to:  None
Originator Name:  Open/Closed:  * Open
Release:  * dev Release: 
Operating System:  * Any Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Sat 08 Mar 2025 08:04:32 PM UTC, original submission:  

Currently "help <method>" just picks up the first class in the list where it find such "method", which may be confusing. E.g. with statistic package I see:

octave:1> pkg load statistics
octave:2> help predict
error: help: ‘predict’ is a method of class ‘ClassificationKNN’; it must be called by
prepending 'ClassificationKNN/' to the method name (type ‘help
@ClassificationKNN/predict’).
octave:3> help @ClassificationKNN/predict
error: help: '@ClassificationKNN/predict' not found

(it also uses "@Class/method" which is an old(?) style)
With an attached patch I I see:

octave:2> pkg load statistics
octave:3> help predict
error: help: ‘predict’ is a method available in multiple classes:
‘ClassificationDiscriminant’, ‘ClassificationGAM’, ‘ClassificationKNN’,
‘ClassificationNeuralNetwork’, ‘ClassificationSVM’,
‘CompactClassificationDiscriminant’, ‘CompactClassificationGAM’,
‘CompactClassificationNeuralNetwork’, ‘CompactClassificationSVM’,
‘RegressionGAM’.  To access help for a specific class implementation,
type ‘help ClassName.predict’.

See also discussion at:
https://octave.discourse.group/t/predict-function-in-octave-is-obscure/6274/8

Dmitri.
--

Dmitri A. Sergatskov <dasergatskov>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by rik5 (Updated the item)
  • -email is unavailable- added by dasergatskov (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2025-03-22 rik5 StatusNone Patch Submitted
    2025-03-22 rik5 SummaryImprove &quot;help&quot; message if 'method' exists im multiple classes Improve "help" message if 'method' exists in multiple classes
    2025-03-08 dasergatskov Attached File- Added diff__unimplemented__.txt.gz, #56987

    Back to the top

    Powered by Savane 3.14-7003.
    Corresponding source code