changeset 380:b054a6833022

Merged in vikikrishna/pytave (pull request #47) pyobject.display: remove hash value and show class in display (fixes issue #71)
author Mike Miller <mike@mtmxr.com>
date Thu, 23 Mar 2017 17:35:43 +0000
parents c90d70aec553 (diff) 24546b7021db (current diff)
children f777dca58361
files @pyobject/display.m
diffstat 1 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/@pyobject/display.m	Fri Mar 17 01:30:53 2017 +0530
+++ b/@pyobject/display.m	Thu Mar 23 17:35:43 2017 +0000
@@ -39,7 +39,12 @@
 
 function display (x)
 
-  loose = ! __compactformat__ ();
+  try
+    [~, spacing] = format ();
+    loose = strcmp (spacing, "loose");
+  catch
+    loose = ! __compactformat__ ();
+  end_try_catch
 
   printf ("%s = [Python object of type %s]\n", inputname (1), __py_class_name__ (x));
   s = char (x);