changeset 256:5589b04e9056

Docs fixes for methods * @pyobject/methods.m: Doc fixes.
author Colin Macdonald <cbm@m.fsf.org>
date Thu, 28 Jul 2016 10:51:12 -0700
parents 9eaed3b11829
children e61bee04f468
files @pyobject/methods.m
diffstat 1 files changed, 7 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/@pyobject/methods.m	Thu Jul 28 10:47:54 2016 -0700
+++ b/@pyobject/methods.m	Thu Jul 28 10:51:12 2016 -0700
@@ -21,8 +21,8 @@
 ## @defmethod @@pyobject methods (@var{x})
 ## List the properties/callables of a Python object.
 ##
-## Returns a cell array of strings, the names of the properties
-## and ``callables'' of @var{x}.
+## Returns a cell array of strings, the names of the ``callables''
+## of @var{x}.
 ##
 ## Example:
 ## @example
@@ -46,6 +46,9 @@
 ## @end group
 ## @end example
 ##
+## To get the properties (non-callables) of an object,
+## @pxref{@@pyobject/fieldnames}.
+##
 ## Note that if you instead want the methods implemented by
 ## the Octave class @code{@@pyobject}, use can always do:
 ## @example
@@ -58,15 +61,13 @@
 ## @end group
 ## @end example
 ##
-## @seealso{methods}
+## @seealso{methods, @@pyobject/fieldnames}
 ## @end defmethod
 
 
 function mtds = methods (x)
 
-  # filter the output of `dir(x)`
-  # (to get callable methods only:
-  # [a for a in dir(x) if callable(getattr(x, a)) and not a.startswith('__')]
+  # filter the output of `dir(x)` to get callable methods only
   cmd = sprintf (["[a for x in (__InOct__['%s'],) for a in dir(x) " ...
                   " if callable(getattr(x, a))" ...
                   " and not a.startswith('__')]"],