Reputation: 61
I am learning python and when I was running the below code
print("X",end='awesome')
The code runs but shows the following syntax error
"Syntax error while detecting tuple"
How I can resolve it?
Upvotes: 0
Views: 404
Reputation: 184221
Aptana is set to use syntax checking for Python 2.x, where print
is a statement. It is recognizing this statement as if you were trying to print a tuple, which is what that would be in Python 2.x, and correctly pointing out that you can't have an =
sign inside the tuple. But the code is written for Python 3.x, where print
is a function call and this syntax is valid.
You need to set Aptana to use the Python 3 grammar. I found this page that shows you how to set up Aptana to use a Python 3.x interpreter (which you probably already have, since the script runs) and syntax.
Upvotes: 1