Mercurial > pytave
diff @pyobject/methods.m @ 373:0e4097c66788
Report a Python object's fully qualified class name correctly
* oct-py-util.cc (pytave::py_object_class_name): Return the correct fully
qualified class name, including module prefix.
(pytave::is_py_kwargs_argument): Check for class name "__main__._OctaveKwargs".
* __py_struct_from_dict__.cc (F__py_class_name__): New function.
* @pyobject/methods.m (pyobject.methods): Use __py_class_name__.
* @pyobject/pyobject.m (pyobject.class): Likewise.
author | Mike Miller <mtmiller@octave.org> |
---|---|
date | Fri, 26 Aug 2016 14:05:37 -0700 |
parents | 9d7188514f2c |
children | d1e00e614b4c |
line wrap: on
line diff
--- a/@pyobject/methods.m Fri Aug 26 13:59:18 2016 -0700 +++ b/@pyobject/methods.m Fri Aug 26 14:05:37 2016 -0700 @@ -79,10 +79,7 @@ modulename = char (pycall ("getattr", x, "__name__")); printf ("Methods for Python module '%s':\n", modulename); else - ## FIXME: should be `class (x)` - classref = pycall ("getattr", x, "__class__"); - classname = char (pycall ("getattr", classref, "__name__")); - printf ("Methods for Python class '%s':\n", classname); + printf ("Methods for Python class '%s':\n", __py_class_name__ (x)); endif disp (list_in_columns (mtds_list)); else