# HG changeset patch # User Colin Macdonald # Date 1470281217 25200 # Node ID 714d1bf1ef7870166420917056690626ffb1c0e1 # Parent df1bddece9d568af7f512813e8a4c55dbdd24359 Add test of multivariable output from subsref * @pyobject/subsref.m: Add test. diff -r df1bddece9d5 -r 714d1bf1ef78 @pyobject/subsref.m --- a/@pyobject/subsref.m Wed Aug 03 20:33:33 2016 -0700 +++ b/@pyobject/subsref.m Wed Aug 03 20:26:57 2016 -0700 @@ -138,6 +138,14 @@ %! assert (L{3}{3}, 12) %!test +%! % list indexing, assign to vars +%! L = pyeval ("[1, 2, 'Octave']"); +%! [a, b, c] = L{:}; +%! assert (a, 1) +%! assert (b, 2) +%! assert (c, "Octave") + +%!test %! % 2D array indexing %! pyexec ("import numpy") %! pyexec ("A = numpy.array([[1, 2], [3, 4]])")