I have the following code inside a cdef class (Cython language):
def toString(self):
res = "lut= " + str(self._mm_np[0].lut) +
"n1= " + str(self._mm_np[0].n1) +
"nlay= "+ str(self._mm_np[0].nlay) +
"n3= " + str(self._mm_np[0].n3)
return res
when I try to compile the cython file containing this code I get the following syntax error: "Expected an identifier or literal" that pointing on the spot with the first '+' in string concatenation.
I have tried to use '\' instead of '+' with no success.. What is the right way to concatenate strings in Pyhton/Cython? Thank you!