)]}'
{"glance_store/_drivers/vmware_datastore.py":[{"author":{"_account_id":7575,"name":"Sabari","email":"smurugesan@vmware.com","username":"sabari"},"change_message_id":"075882565f50171a4a165b674c63af1df8fa4469","unresolved":false,"context_lines":[{"line_number":185,"context_line":"                    size_header \u003d (\u0027%x\\r\\n\u0027 % chunk_len).encode(\u0027ascii\u0027)"},{"line_number":186,"context_line":"                    self.current_chunk \u003d b\u0027\u0027.join((size_header, chunk,"},{"line_number":187,"context_line":"                                                   b\u0027\\r\\n\u0027))"},{"line_number":188,"context_line":"                else:"},{"line_number":189,"context_line":"                    self.current_chunk \u003d b\u0027%x\\r\\n%s\\r\\n\u0027 % (chunk_len, chunk)"},{"line_number":190,"context_line":"            else:"},{"line_number":191,"context_line":"                self.current_chunk \u003d b\u00270\\r\\n\\r\\n\u0027"}],"source_content_type":"text/x-python","patch_set":1,"id":"3afb71cf_e7dc31e6","line":188,"updated":"2015-06-08 08:14:29.000000000","message":"IMO, the code in if clause is also compatible with py27, why do we need the conditional for? \n\nHopefully I am not missing something trivial (It\u0027s about 1:30 AM) :)","commit_id":"b4941169b77c14ba01970ba3627b5c6c03fcafc6"},{"author":{"_account_id":7575,"name":"Sabari","email":"smurugesan@vmware.com","username":"sabari"},"change_message_id":"7a95fba14c86201ea492ac72162de23548417b14","unresolved":false,"context_lines":[{"line_number":185,"context_line":"                    size_header \u003d (\u0027%x\\r\\n\u0027 % chunk_len).encode(\u0027ascii\u0027)"},{"line_number":186,"context_line":"                    self.current_chunk \u003d b\u0027\u0027.join((size_header, chunk,"},{"line_number":187,"context_line":"                                                   b\u0027\\r\\n\u0027))"},{"line_number":188,"context_line":"                else:"},{"line_number":189,"context_line":"                    self.current_chunk \u003d b\u0027%x\\r\\n%s\\r\\n\u0027 % (chunk_len, chunk)"},{"line_number":190,"context_line":"            else:"},{"line_number":191,"context_line":"                self.current_chunk \u003d b\u00270\\r\\n\\r\\n\u0027"}],"source_content_type":"text/x-python","patch_set":1,"id":"3afb71cf_96f89bc4","line":188,"in_reply_to":"3afb71cf_51911546","updated":"2015-06-10 08:57:51.000000000","message":"Yup, sorry about the -1.\n\nand yes, str.encode() doesn\u0027t make sense but I was thinking encode(\u0027ascii\u0027) is a no-op anyway for python 2. May be for readability, we can keep them separate.","commit_id":"b4941169b77c14ba01970ba3627b5c6c03fcafc6"},{"author":{"_account_id":9107,"name":"Victor Stinner","email":"vstinner@redhat.com","username":"haypo"},"change_message_id":"0e69ad12e7c7604864e02c853e5636f941fa2e8f","unresolved":false,"context_lines":[{"line_number":185,"context_line":"                    size_header \u003d (\u0027%x\\r\\n\u0027 % chunk_len).encode(\u0027ascii\u0027)"},{"line_number":186,"context_line":"                    self.current_chunk \u003d b\u0027\u0027.join((size_header, chunk,"},{"line_number":187,"context_line":"                                                   b\u0027\\r\\n\u0027))"},{"line_number":188,"context_line":"                else:"},{"line_number":189,"context_line":"                    self.current_chunk \u003d b\u0027%x\\r\\n%s\\r\\n\u0027 % (chunk_len, chunk)"},{"line_number":190,"context_line":"            else:"},{"line_number":191,"context_line":"                self.current_chunk \u003d b\u00270\\r\\n\\r\\n\u0027"}],"source_content_type":"text/x-python","patch_set":1,"id":"3afb71cf_5cdfe539","line":188,"in_reply_to":"3afb71cf_96f89bc4","updated":"2015-06-10 09:18:58.000000000","message":"\u003e I was thinking encode(\u0027ascii\u0027) is a no-op anyway for python 2\n\nstr.encode(\u0027ascii\u0027) begins by decoding the string from ASCII (which can fail with UnicodeDecodeError, but not on this exact code) and then encode back the string to ASCII. So it would run two useless operations on Python 2.\n\n\u003e May be for readability, we can keep them separate.\n\nIt\u0027s also for the efficiency.","commit_id":"b4941169b77c14ba01970ba3627b5c6c03fcafc6"},{"author":{"_account_id":9107,"name":"Victor Stinner","email":"vstinner@redhat.com","username":"haypo"},"change_message_id":"7f5ba27ce09dce152070ea0a9d410bbbef402824","unresolved":false,"context_lines":[{"line_number":185,"context_line":"                    size_header \u003d (\u0027%x\\r\\n\u0027 % chunk_len).encode(\u0027ascii\u0027)"},{"line_number":186,"context_line":"                    self.current_chunk \u003d b\u0027\u0027.join((size_header, chunk,"},{"line_number":187,"context_line":"                                                   b\u0027\\r\\n\u0027))"},{"line_number":188,"context_line":"                else:"},{"line_number":189,"context_line":"                    self.current_chunk \u003d b\u0027%x\\r\\n%s\\r\\n\u0027 % (chunk_len, chunk)"},{"line_number":190,"context_line":"            else:"},{"line_number":191,"context_line":"                self.current_chunk \u003d b\u00270\\r\\n\\r\\n\u0027"}],"source_content_type":"text/x-python","patch_set":1,"id":"3afb71cf_51911546","line":188,"in_reply_to":"3afb71cf_e7dc31e6","updated":"2015-06-10 05:59:43.000000000","message":"str.encode() doesn\u0027t make sense on Python 2. On Python 2, str is bytes. You cannot encode bytes, only Unicode.\n\nThe Python 2 code (bytes % args) is faster and more readable.\n\nBy the way, bytes % args is back in Python 3.5 (PEP 461).\n\nPlease don\u0027t vote -1 to ask a question.","commit_id":"b4941169b77c14ba01970ba3627b5c6c03fcafc6"}]}
