The following line does not work:
(count, total) += self._GetNumberOfNonZeroActions((state[0] + x, state[1] - ring, state[2]))
I assume that in this case the + = operator cannot be used. I wonder why?
edit: Actually, I want to add to the number of variables and summarize the values given by the tuple returned by this function. Now, when I think about it, it makes no sense to allow (a, b) + = (1, 2), since this will be creating a new tuple, right?
In other words, is there a way to simplify this?
res = self._GetNumberOfNonZeroActions((state[0] + x, state[1] + ring, state[2]))
count, total = res[0], res[1]
source
share