diff @pyobject/subsasgn.m @ 369:540b36e797c8

Reduce number of function calls, clean up formatting in subasgn and subsref * @pyobject/subsasgn.m: Reduce number of pycalls. * @pyobject/subsref.m: Reduce number of pycalls. Clean up code formatting. Add type checks for '()' indexing, explicit error message about slice indexing.
author Mike Miller <mtmiller@octave.org>
date Thu, 25 Aug 2016 23:20:02 -0700
parents 9d7188514f2c
children 3613ffbd52b2
line wrap: on
line diff
--- a/@pyobject/subsasgn.m	Thu Aug 25 16:27:46 2016 -0700
+++ b/@pyobject/subsasgn.m	Thu Aug 25 23:20:02 2016 -0700
@@ -65,8 +65,7 @@
         ind = pycall ("tuple", idx.subs);
       endif
 
-      xsi = pycall ("getattr", x, "__setitem__");   # x.__setitem__
-      pycall (xsi, ind, rhs);
+      pycall ("operator.setitem", x, ind, rhs);
       r = x;
 
     otherwise