Mercurial > pytave
diff pycall.cc @ 184:8b97647e48f1
maint: whitespace fixes for cset 2b03585d4ddd
* pycall.cc: Improve readability of Python code block.
* python_to_octave.cc (pyobj_to_octvalue): Use space between function name
and opening parenthesis.
author | Mike Miller <mtmiller@octave.org> |
---|---|
date | Wed, 08 Jun 2016 12:24:59 -0700 |
parents | 2b03585d4ddd |
children | ac377ace2ee4 |
line wrap: on
line diff
--- a/pycall.cc Sat Jun 04 13:30:01 2016 -0700 +++ b/pycall.cc Wed Jun 08 12:24:59 2016 -0700 @@ -188,9 +188,10 @@ %! assert (z, [40 40]) %!test -%! pyexec (["def pyfunc(x):\n if x.item((0,0)) is True:\n return 30", ... -%! "\n elif x.item((0,0)) is False:\n return 20\n else:", ... -%! "\n return 10"]); +%! pyexec (["def pyfunc(x):\n" ... +%! " if x.item((0,0)) is True:\n return 30\n" ... +%! " elif x.item((0,0)) is False:\n return 20\n" ... +%! " else:\n return 10"]); %! assert (pycall ("pyfunc", true), 30) %! assert (pycall ("pyfunc", false), 20) %! assert (pycall ("pyfunc", 10), 10)