)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":3012,"name":"Dina Belova","email":"dbelova@mirantis.com","username":"dbelova"},"change_message_id":"78f120e7716a87679ceb2d611d2725c299ade076","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Change using of limit argument in get_sample"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Used limit as argument in scan instead of self writed approach"},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"Change-Id: I2576b3bf3bb210ba0f21391766e62e19c23b21a0"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"7adec928_b5faf6ba","line":9,"range":{"start_line":9,"start_character":47,"end_line":9,"end_character":53},"updated":"2014-05-16 20:56:09.000000000","message":"sorry, not \u0027writed\u0027, but \u0027written\u0027... typo, I guess)","commit_id":"94a659ffc7130eb1873ba41581c214f9378c29c2"},{"author":{"_account_id":6676,"name":"zqfan","email":"aji.zqfan@gmail.com","username":"aji-zqfan"},"change_message_id":"38b0b47f5fe877e8a6d156bf38ab63d421d0a2b7","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Change using of limit argument in get_sample"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Used limit as argument in scan instead of self writed approach"},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"Change-Id: I2576b3bf3bb210ba0f21391766e62e19c23b21a0"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"1ae5cdf2_ad27bbc8","line":9,"updated":"2014-06-06 08:37:08.000000000","message":"curious: this sentence seems a bit hard to me, is there anyone else feels same?","commit_id":"d2fa12b8f57a223d225402ffa6795b4c35c82918"},{"author":{"_account_id":3012,"name":"Dina Belova","email":"dbelova@mirantis.com","username":"dbelova"},"change_message_id":"df86da5fd6a9c6fc5fdfc4388dac7a05cb508977","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Change using of limit argument in get_sample"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Used limit as argument in scan instead of self writed approach"},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"Change-Id: I2576b3bf3bb210ba0f21391766e62e19c23b21a0"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"1ae5cdf2_9baeab2e","line":9,"in_reply_to":"1ae5cdf2_ad27bbc8","updated":"2014-06-06 13:58:39.000000000","message":"Probably the following will sound better:\n\nUse \u0027limit\u0027 as argument in scan method instead of self written approach.\n\nIt was hard to read due to wrong verb form and no \u0027\u0027","commit_id":"d2fa12b8f57a223d225402ffa6795b4c35c82918"}],"ceilometer/storage/impl_hbase.py":[{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"7e21a17a5566c9835fdeac7dc1bb1e5a77300062","unresolved":false,"context_lines":[{"line_number":656,"context_line":"                                              \"you may want to add it!\")"},{"line_number":657,"context_line":"        for k in sorted(rows):"},{"line_number":658,"context_line":"            if limit is not None:"},{"line_number":659,"context_line":"                if limit \u003d\u003d 0:"},{"line_number":660,"context_line":"                    break"},{"line_number":661,"context_line":"                else:"},{"line_number":662,"context_line":"                    limit -\u003d 1"}],"source_content_type":"text/x-python","patch_set":1,"id":"7adec928_d5aba972","line":659,"updated":"2014-05-20 12:52:53.000000000","message":"can we merge these two conditions to:\n\n    if not limit:\n\nor switch ordering to around to make it cleaner:\n\n    if limit: limit -\u003d 1 else: break","commit_id":"94a659ffc7130eb1873ba41581c214f9378c29c2"},{"author":{"_account_id":6676,"name":"zqfan","email":"aji.zqfan@gmail.com","username":"aji-zqfan"},"change_message_id":"9b679176a7c1d61777640faa9b6535951419bc92","unresolved":false,"context_lines":[{"line_number":612,"context_line":"        for k in sorted(rows):"},{"line_number":613,"context_line":"            if limit:"},{"line_number":614,"context_line":"                limit -\u003d 1"},{"line_number":615,"context_line":"            else:"},{"line_number":616,"context_line":"                break"},{"line_number":617,"context_line":"            yield k, rows[k]"},{"line_number":618,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"1ae5cdf2_57525d67","line":615,"updated":"2014-06-05 15:37:47.000000000","message":"big -1: if limit \u003d\u003d None, then the else will be executed, this method yield nothing, which will break most functionality since the limit can usually be None","commit_id":"85ee5684e6a28a11f7d0296700b31733a790bf28"},{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"58abf67d89a7bfc7c8b7090a3394aa5a76258c79","unresolved":false,"context_lines":[{"line_number":612,"context_line":"        for k in sorted(rows):"},{"line_number":613,"context_line":"            if limit:"},{"line_number":614,"context_line":"                limit -\u003d 1"},{"line_number":615,"context_line":"            else:"},{"line_number":616,"context_line":"                break"},{"line_number":617,"context_line":"            yield k, rows[k]"},{"line_number":618,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"1ae5cdf2_8d4856b4","line":615,"in_reply_to":"1ae5cdf2_57525d67","updated":"2014-06-05 16:25:38.000000000","message":"wow. my bad on the suggested change. apologies Ilya","commit_id":"85ee5684e6a28a11f7d0296700b31733a790bf28"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"37590cf68bb2d91e116f7ae984a6d3ce0af0d6c2","unresolved":false,"context_lines":[{"line_number":609,"context_line":"                else:"},{"line_number":610,"context_line":"                    raise NotImplementedError(\"%s filter is not implemented, \""},{"line_number":611,"context_line":"                                              \"you may want to add it!\")"},{"line_number":612,"context_line":"        for k in sorted(rows):"},{"line_number":613,"context_line":"            if limit is not None:"},{"line_number":614,"context_line":"                if limit \u003d\u003d 0:"},{"line_number":615,"context_line":"                    break"}],"source_content_type":"text/x-python","patch_set":3,"id":"1ae5cdf2_8282cec5","line":612,"updated":"2014-06-06 07:56:33.000000000","message":"Clearer as:\n\n  for k in sorted(rows)[:limit]:\n\ni.e. the messy conditional on limit within the for loop can then be dropped, and the None case doesn\u0027t need to be explicitly handled","commit_id":"8b17d5922ce4c8da143d243bbdc172d1b26ef65c"},{"author":{"_account_id":6676,"name":"zqfan","email":"aji.zqfan@gmail.com","username":"aji-zqfan"},"change_message_id":"38b0b47f5fe877e8a6d156bf38ab63d421d0a2b7","unresolved":false,"context_lines":[{"line_number":618,"context_line":"                else:"},{"line_number":619,"context_line":"                    raise NotImplementedError(\"%s filter is not implemented, \""},{"line_number":620,"context_line":"                                              \"you may want to add it!\")"},{"line_number":621,"context_line":"        for k in sorted(rows[:limit]):"},{"line_number":622,"context_line":"            yield k, rows[k]"},{"line_number":623,"context_line":""},{"line_number":624,"context_line":"    @staticmethod"}],"source_content_type":"text/x-python","patch_set":5,"id":"1ae5cdf2_68a4c107","line":621,"updated":"2014-06-06 08:37:08.000000000","message":"-1: sorted(rows)[:limit] is different with sorted(rows[:limit]), I know you want to improve the efficiency, but even if you\u0027re sure in this case, that the two results are same, please add a comment to explain it, since it is not so intuitive (clear)","commit_id":"d2fa12b8f57a223d225402ffa6795b4c35c82918"},{"author":{"_account_id":6676,"name":"zqfan","email":"aji.zqfan@gmail.com","username":"aji-zqfan"},"change_message_id":"1eb4be1c91f7890bf8f2c34df85002128697233b","unresolved":false,"context_lines":[{"line_number":618,"context_line":"                else:"},{"line_number":619,"context_line":"                    raise NotImplementedError(\"%s filter is not implemented, \""},{"line_number":620,"context_line":"                                              \"you may want to add it!\")"},{"line_number":621,"context_line":"        for k in sorted(rows[:limit]):"},{"line_number":622,"context_line":"            yield k, rows[k]"},{"line_number":623,"context_line":""},{"line_number":624,"context_line":"    @staticmethod"}],"source_content_type":"text/x-python","patch_set":5,"id":"1ae5cdf2_28e0f9cb","line":621,"in_reply_to":"1ae5cdf2_68a4c107","updated":"2014-06-06 08:46:27.000000000","message":"-1: it seems no need to sort the rows, rows is something subset (by order) of self._rows, see L586.\n\n-1: since rows is a dict, such syntax is wrong:\n\n    \u003e\u003e\u003e d \u003d {1:1, 2:2}\n    \u003e\u003e\u003e d[:None]\n    Traceback (most recent call last):\n      File \"\u003cstdin\u003e\", line 1, in \u003cmodule\u003e\n    TypeError: unhashable type\n    \u003e\u003e\u003e","commit_id":"d2fa12b8f57a223d225402ffa6795b4c35c82918"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"2edf40683e887a6c2521abdcbcc346b84dbb6554","unresolved":false,"context_lines":[{"line_number":618,"context_line":"                else:"},{"line_number":619,"context_line":"                    raise NotImplementedError(\"%s filter is not implemented, \""},{"line_number":620,"context_line":"                                              \"you may want to add it!\")"},{"line_number":621,"context_line":"        for k in sorted(rows[:limit]):"},{"line_number":622,"context_line":"            yield k, rows[k]"},{"line_number":623,"context_line":""},{"line_number":624,"context_line":"    @staticmethod"}],"source_content_type":"text/x-python","patch_set":5,"id":"1ae5cdf2_73e672e9","line":621,"in_reply_to":"1ae5cdf2_68a4c107","updated":"2014-06-06 09:14:11.000000000","message":"Yep, the slicing should be done *after* the sorting for that to be equivalent to your earlier logic.","commit_id":"d2fa12b8f57a223d225402ffa6795b4c35c82918"}]}
