)]}'
{"novaclient/v1_1/contrib/migrations.py":[{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"a55cbc7ac79bd8f6eb22f72b375e0fe8fec39ae0","unresolved":false,"context_lines":[{"line_number":46,"context_line":""},{"line_number":47,"context_line":"        \"\"\""},{"line_number":48,"context_line":"        Transform the dict to a sequence of two-element tuples in fixed"},{"line_number":49,"context_line":"        order, then the encoded string will be consistent in Python 2\u00263."},{"line_number":50,"context_line":"        \"\"\""},{"line_number":51,"context_line":"        keylist \u003d list(opts)"},{"line_number":52,"context_line":"        keylist.sort()"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAS3%2F%2FTWA%3D","line":49,"updated":"2013-09-30 15:51:34.000000000","message":"Use a comment, not a docstring.  Docstrings don\u0027t even make sense in the middle of a function!","commit_id":"9efe81a88499dc3f2e8f1d5c85a0791aab8810ef"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"a55cbc7ac79bd8f6eb22f72b375e0fe8fec39ae0","unresolved":false,"context_lines":[{"line_number":50,"context_line":"        \"\"\""},{"line_number":51,"context_line":"        keylist \u003d list(opts)"},{"line_number":52,"context_line":"        keylist.sort()"},{"line_number":53,"context_line":"        new_opts \u003d [(key, opts[key]) for key in keylist]"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"        query_string \u003d \"?%s\" % urlutils.urlencode(new_opts) if new_opts else \"\""},{"line_number":56,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAS3%2F%2FTVM%3D","line":53,"updated":"2013-09-30 15:51:34.000000000","message":"I would use something like:\n\n    new_opts \u003d sorted(opts.items(), key\u003dlambda x: x[0])\n\n(I\u0027m presuming that the \"sorted()\" built-in will accept the opts.items() iterator; if not, something like \"list(opts.items())\" should do the trick :)","commit_id":"9efe81a88499dc3f2e8f1d5c85a0791aab8810ef"}]}
