)]}'
{"openstack/resource.py":[{"author":{"_account_id":8257,"name":"Brian Curtin","email":"brian@python.org","username":"briancurtin"},"change_message_id":"9a20d6991e965b456752142e52bf9a118a5dff40","unresolved":false,"context_lines":[{"line_number":416,"context_line":"        del self._attrs[self.name_attribute]"},{"line_number":417,"context_line":""},{"line_number":418,"context_line":"    @property"},{"line_number":419,"context_line":"    def attrs(self):"},{"line_number":420,"context_line":"        return self._attrs"},{"line_number":421,"context_line":""},{"line_number":422,"context_line":"    @property"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a016987_fd41363a","line":419,"updated":"2015-05-28 13:53:55.000000000","message":"For what I think we\u0027d want to expose, I think this would be better as a method called \"as_dict\" that flattens out what\u0027s in self._attrs, instead of directly exposing the internal _attrs (I think I said property on the other issue, but I spoke too early). Remember that we have header values in there in a special key called \"headers\", so that would look odd to users and unnecessarily exposes how we\u0027ve structured things.\n\nAlso, returning this dictionary and having a caller modify its contents would modify the actual Resource, so anything we return here should be a copy. I think the best way would be to create a new dictionary containing _attrs while popping _attrs[\"headers\"] and inserting them as top-level keys again (like we used to do for _attrs several months ago).","commit_id":"b4793ec9c2ac9e746657efc62e7f06e1288002d9"},{"author":{"_account_id":8246,"name":"Qiming Teng","email":"tengqm@outlook.com","username":"tengqm"},"change_message_id":"8a2ff834761cc44d292f3130589382c3d17cea0e","unresolved":false,"context_lines":[{"line_number":416,"context_line":"        del self._attrs[self.name_attribute]"},{"line_number":417,"context_line":""},{"line_number":418,"context_line":"    @property"},{"line_number":419,"context_line":"    def attrs(self):"},{"line_number":420,"context_line":"        return self._attrs"},{"line_number":421,"context_line":""},{"line_number":422,"context_line":"    @property"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a016987_5db96aca","line":419,"in_reply_to":"7a016987_fd41363a","updated":"2015-05-28 22:45:08.000000000","message":"ya, totally makes sense. will change.","commit_id":"b4793ec9c2ac9e746657efc62e7f06e1288002d9"},{"author":{"_account_id":8257,"name":"Brian Curtin","email":"brian@python.org","username":"briancurtin"},"change_message_id":"cc2707938f218797d6be7867368ebfafd2b6065d","unresolved":false,"context_lines":[{"line_number":468,"context_line":""},{"line_number":469,"context_line":"    def to_dict(self):"},{"line_number":470,"context_line":"        attrs \u003d copy.deepcopy(self._attrs)"},{"line_number":471,"context_line":"        attrs.pop(HEADERS, None)"},{"line_number":472,"context_line":"        return attrs"},{"line_number":473,"context_line":""},{"line_number":474,"context_line":"    ##"}],"source_content_type":"text/x-python","patch_set":2,"id":"5afe65bd_c95fe8e3","line":471,"updated":"2015-06-03 18:44:49.000000000","message":"I think this line should actually be something like\n\n    headers \u003d attrs.pop(HEADERS, {})\n    attrs.update(headers)\n    return attrs\n\nso that the header values still appear in the dictionary but as one flat structure. This way they\u0027re entirely excluded.","commit_id":"51639736cc7ceb6c868f8f825257c790712bd26b"}]}
