Expected Primary-expression Before Int

Compilation error: "expected primary-expression before ' '" when trying to specify argument type in a function call Asked 13 years, 9 months ago Modified 3 years, 3 months ago Viewed 228k times

expected primary-expression before int 1

How can I solve the error 'expected expression'? Asked 4 years, 11 months ago Modified 4 years, 11 months ago Viewed 37k times

expected primary-expression before int 2

Expected: end of statement Says exactly that. Everything before " (" is a perfectly valid instruction, except it's not terminated. So it's not the " (", it's the type hints. Insert spaces to separate the operators from the operands, and you'll fix the problem. More explicitness couldn't hurt, either:

expected primary-expression before int 3

print 1 ^ IndentationError: expected an indented block It's quite hard to understand what is happening here, it seems that there is an indent block... But as I said, I've used tabs and spaces, and you should never do that. You can get some info here. Remove all tabs and replaces them by four spaces. And configure your editor to do that ...

expected primary-expression before int 4