mirror of
https://github.com/not-kennethreitz/convore.json.git
synced 2026-06-05 23:20:19 +00:00
1 line
1.7 KiB
JSON
1 line
1.7 KiB
JSON
[{"user_id": 653, "stars": [], "topic_id": 13054, "date_created": 1300132695.8360081, "message": "In Python 2.7, I had some code that l looked like this (assume `right` is a list of dictionaries): right = {r.get(join_key): r for r in right}. When I run this same code in 2.5, I get a syntax error. What feature or change is it in 2.7 that makes this work?", "group_id": 292, "id": 350353}, {"user_id": 5778, "stars": [], "topic_id": 13054, "date_created": 1300132779.8569939, "message": "you can kinda do a dict comprehension in 2.5", "group_id": 292, "id": 350366}, {"user_id": 6587, "stars": [], "topic_id": 13054, "date_created": 1300132767.9435201, "message": "2.5 doesn't have dictionary comprehension", "group_id": 292, "id": 350362}, {"user_id": 5778, "stars": [], "topic_id": 13054, "date_created": 1300132803.525593, "message": "right = dict([(key, val) for key, val in right.items()])", "group_id": 292, "id": 350377}, {"user_id": 653, "stars": [], "topic_id": 13054, "date_created": 1300132883.390187, "message": "@codekoala Cool. Thanks for that too.", "group_id": 292, "id": 350397}, {"user_id": 653, "stars": [], "topic_id": 13054, "date_created": 1300132814.855623, "message": "@keegan Thanks! I knew how to fix it, but I wasn't sure why it was broken. Usually the other way around.", "group_id": 292, "id": 350379}, {"user_id": 5778, "stars": [], "topic_id": 13054, "date_created": 1300132890.8648541, "message": "@aezellisdead np", "group_id": 292, "id": 350398}, {"user_id": 5778, "stars": [{"date_created": 1300136588.153187, "user_id": 16058}], "topic_id": 13054, "date_created": 1300132827.894654, "message": "or just dict(derp for derp in right.items())", "group_id": 292, "id": 350381}] |