changeset 378:c90d70aec553

pyobject.display: make display compatible to octave 4.3.0 (fixes issue #77)
author Vijay Krishnavanshi <vijaykrishnavanshi@gmail.com>
date Fri, 17 Mar 2017 01:02:26 +0530
parents cfd01e91d8e6
children b054a6833022
files @pyobject/display.m
diffstat 1 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/@pyobject/display.m	Wed Jan 18 11:13:38 2017 -0800
+++ b/@pyobject/display.m	Fri Mar 17 01:02:26 2017 +0530
@@ -39,7 +39,12 @@
 
 function display (x)
 
-  loose = ! __compactformat__ ();
+  try
+    [~, spacing] = format ();
+    loose = strcmp (spacing, "loose");
+  catch
+    loose = ! __compactformat__ ();
+  end_try_catch
 
   printf ("%s = [pyobject 0x%x]\n", inputname (1), id (x));
   s = char (x);