tags:

views:

159

answers:

1

Hi

I have been using a python script for a long while and all of sudden it gives me:

  File "youtube-dl.py", line 103
    @staticmethod
    ^
SyntaxError: invalid syntax

If you want to see the script, its right here: http://bitbucket.org/rg3/youtube-dl/raw/2009.06.29/youtube-dl

What could be the reason?

Update

I am using python version Python 2.3.4.

+4  A: 

You might be using an old Python version that didn't support decorators yet.

Martin v. Löwis
I am using Python 2.3.4 - is that old?
Abs
Yeah download 2.5!Changed in version 2.4: Function decorator syntax added.
Mihail
Python 2.3 was released in 2003, so yeah, it's old.
Seth
http://docs.python.org/whatsnew/2.4.html#pep-318-decorators-for-functions-and-methods
Ben Blank
THANK YOU! I have managed to fix it - with a new python install! :) I need to learn python!
Abs