So I have the following code
base = "INSERT INTO " + table + " ("
lineCount = 0
tableFieldNames = dataArray['titleRow']
**for titleRow as tableFieldNames:**
if some_list[-1] == titleRow:
base = base + titleRow
else:
base = base + titleRow + ","
base = base + ") VALUES "
where the bolded part gives an error “Invalid Syntax” and pypex’s eclipse plugin gives a bit more verbose “Excepted:in” for the bolded text. What is throwing me is what that refers too. I’ve included a : at the end of the for loop declaration, and the array that it refers too is valid. Plus I have a for loop after this block of code that gives no such strange error.
Has anyone ran into such a thing, and found a way to resolve it (and even to make the parse errors more verbose?)
It should be
for titleRow in tableFieldNames:(in, not as).