changeset 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 cede17a86ccf
files pycall.cc python_to_octave.cc
diffstat 2 files changed, 5 insertions(+), 4 deletions(-) [+]
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)
--- a/python_to_octave.cc	Sat Jun 04 13:30:01 2016 -0700
+++ b/python_to_octave.cc	Wed Jun 08 12:24:59 2016 -0700
@@ -488,7 +488,7 @@
     extract<boost::python::dict> dictx (py_object);
     extract<boost::python::tuple> tuplex (py_object);
 
-    if (boolx.check() && PyBool_Check ((PyArrayObject*)py_object.ptr ()))
+    if (boolx.check () && PyBool_Check ((PyArrayObject*)py_object.ptr ()))
       oct_value = boolx ();
     else if (intx.check ())
       oct_value = intx ();