changeset 255:9eaed3b11829

Indicate this is a Python class/module in method output * @pyobject/methods.m: Print "Python".
author Colin Macdonald <cbm@m.fsf.org>
date Thu, 28 Jul 2016 10:47:54 -0700
parents a3660e7f8dc9
children 5589b04e9056
files @pyobject/methods.m
diffstat 1 files changed, 3 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/@pyobject/methods.m	Thu Jul 28 10:50:17 2016 -0700
+++ b/@pyobject/methods.m	Thu Jul 28 10:47:54 2016 -0700
@@ -30,7 +30,7 @@
 ## pyexec ("import os")
 ## os = pyeval ("os");
 ## methods (os)
-##   @print{} Methods for module os:
+##   @print{} Methods for Python module 'os':
 ##   @print{} ...
 ##   @print{} chdir ...
 ##   @print{} ...
@@ -81,13 +81,12 @@
 
     if (pycall (is_module, x))
       modulename = pycall ("getattr", x, "__name__");
-      printf ("Methods for module %s:\n", modulename);
+      printf ("Methods for Python module '%s':\n", modulename);
     else
       ## FIXME: should be `class (x)`
       classref = pycall ("getattr", x, "__class__");
       classname = pycall ("getattr", classref, "__name__");
-      ## FIXME: indicate that this is a Python class?
-      printf ("Methods for class %s:\n", classname);
+      printf ("Methods for Python class '%s':\n", classname);
     endif
     disp (list_in_columns (mtds_list));
   else