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

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

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -