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
Post a Comment