[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #63104] exist and which fail to query +package

From: Qianqian Fang
Subject: [Octave-bug-tracker] [bug #63104] exist and which fail to query +package functions (such as containers.Map)
Date: Sun, 25 Sep 2022 12:37:35 -0400 (EDT)


                 Summary: exist and which fail to query +package functions
(such as containers.Map)
                 Project: GNU Octave
               Submitter: fangq
               Submitted: Sun 25 Sep 2022 04:37:34 PM UTC
                Category: Octave Function
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Incorrect Result
                  Status: None
             Assigned to: None
         Originator Name: Qianqian Fang
        Originator Email: 
             Open/Closed: Open
                 Release: 6.4.0
         Discussion Lock: Any
        Operating System: GNU/Linux


Follow-up Comments:

Date: Sun 25 Sep 2022 04:37:34 PM UTC By: Qianqian Fang <fangq>

functions stored in a package namespace (+package folder) can not be queried
using exist() or which().

This can be reproduced on Octave 5.2 and 6.4. (did not test for 7.x or dev)

Expected result (as in MATLAB):

>> exist('containers.Map')
ans =
>> which containers.Map
containers.Map is a built-in method  % containers.Map constructor
>> which matlab.lang.makeUniqueStrings
/.../MATLAB/R2020a/toolbox/matlab/lang/+matlab/+lang/makeUniqueStrings.m  %
static method or package function
>> exist('matlab.lang.makeUniqueStrings.m') %not sure why this happens
ans =

Current result (tested in Octave 6.4.0 on Ubuntu 22.04)
   query failed, but they can be called

>> exist('containers.Map')
ans = 0
>> which containers.Map
>> a=containers.Map()
a =
  containers.Map object with properties:
    Count     : 0
    KeyType   : char
    ValueType : any

>> exist('matlab.lang.makeUniqueStrings')
ans = 0
>> matlab.lang.makeUniqueStrings('test')
ans = test
>> ls '/usr/share/octave/6.4.0/m/+containers/Map.m'
>> ls '/usr/share/octave/6.4.0/m/+matlab/+lang/makeUniqueStrings.m'


Reply to this item at:


Message sent via Savannah

reply via email to

[Prev in Thread] Current Thread [Next in Thread]