python - Syntax error on server -


i've following line in python:

out = {"response": {"status": 200, "message": status_codes["200"], "data": { article }}} 

in machine runs ok(python 2.7) syntax error on production server(python 2.6.6).

do have ideas of be?, don't see problem is.

don't use set syntax { item }, use set([item]). code should read

out = {"response": {"status": 200, "message": status_codes["200"], "data": set([article]) }} 

note set syntax curly brackets has been added in python 2.7. if want support lower versions, you're therefore bound use older version.


Comments

Popular posts from this blog

Change php variable from jquery value using ajax (same page) -

How can I fetch data from a web server in an android application? -

jquery - How can I dynamically add a browser tab? -