Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Python 3 invalid syntax with print()

Tags:

python-3.x

I've converted a code written in Python 2.6 into Python 3 using 2to3. All the syntax changes have been made accordingly, but I still get an error like following:

print('Type: ' + t)
    ^
SyntaxError: invalid syntax

this happens not only with print() but other totally valid codes like self.type(arg)

What could be wrong? I'm using python 3.2 by the way.

Please hlep me out..

like image 1000
CosmicRabbitMediaInc Avatar asked Dec 27 '22 05:12

CosmicRabbitMediaInc


1 Answers

The syntax error is likely on the row above. Looks like a missing parenthesis or something.

like image 64
Lennart Regebro Avatar answered May 07 '23 07:05

Lennart Regebro