)]}'
{"designate/objects/base.py":[{"author":{"_account_id":8094,"name":"Vinod Mangalpally","email":"mrvinod@outlook.com","username":"vinodmr"},"change_message_id":"33a1e2442e358c81aa7d5b018616cfa2d890bfd3","unresolved":false,"context_lines":[{"line_number":92,"context_line":""},{"line_number":93,"context_line":"        return instance"},{"line_number":94,"context_line":""},{"line_number":95,"context_line":"    def __init__(self, **kwargs):"},{"line_number":96,"context_line":"        self._obj_changes \u003d set()"},{"line_number":97,"context_line":"        self._obj_original_values \u003d dict()"},{"line_number":98,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"baada198_dc104b5b","line":95,"updated":"2014-07-14 19:19:22.000000000","message":"Should there be a *args argument too?","commit_id":"9a9f2a62722185532633bd2e4a6ae3f1a8098d50"},{"author":{"_account_id":741,"name":"Kiall Mac Innes","email":"kiall@macinnes.ie","username":"kiall"},"change_message_id":"3c6b5ac110b86342f8231693efe2243b0293a08c","unresolved":false,"context_lines":[{"line_number":92,"context_line":""},{"line_number":93,"context_line":"        return instance"},{"line_number":94,"context_line":""},{"line_number":95,"context_line":"    def __init__(self, **kwargs):"},{"line_number":96,"context_line":"        self._obj_changes \u003d set()"},{"line_number":97,"context_line":"        self._obj_original_values \u003d dict()"},{"line_number":98,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"baada198_f7836800","line":95,"in_reply_to":"baada198_dc104b5b","updated":"2014-07-14 19:32:49.000000000","message":"In this case, No - If we receive non-keyword arguments, we\u0027ll not know what to do with them since we can\u0027t assign them to a field","commit_id":"9a9f2a62722185532633bd2e4a6ae3f1a8098d50"},{"author":{"_account_id":8094,"name":"Vinod Mangalpally","email":"mrvinod@outlook.com","username":"vinodmr"},"change_message_id":"33a1e2442e358c81aa7d5b018616cfa2d890bfd3","unresolved":false,"context_lines":[{"line_number":99,"context_line":"        for name, value in kwargs.items():"},{"line_number":100,"context_line":"            if name in self.FIELDS:"},{"line_number":101,"context_line":"                setattr(self, name, value)"},{"line_number":102,"context_line":"            else:"},{"line_number":103,"context_line":"                raise TypeError(\"\u0027%s\u0027 is an invalid keyword argument\" % name)"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"    def to_primitive(self):"}],"source_content_type":"text/x-python","patch_set":12,"id":"baada198_573254f2","line":102,"updated":"2014-07-14 19:19:22.000000000","message":"Could you add something like \"\u0027%s\u0027 is an invalid keyword argument for a DesignateObject\" or something similar - so that it is obvious from the message that this is related to DesignateObject.","commit_id":"9a9f2a62722185532633bd2e4a6ae3f1a8098d50"},{"author":{"_account_id":741,"name":"Kiall Mac Innes","email":"kiall@macinnes.ie","username":"kiall"},"change_message_id":"3c6b5ac110b86342f8231693efe2243b0293a08c","unresolved":false,"context_lines":[{"line_number":99,"context_line":"        for name, value in kwargs.items():"},{"line_number":100,"context_line":"            if name in self.FIELDS:"},{"line_number":101,"context_line":"                setattr(self, name, value)"},{"line_number":102,"context_line":"            else:"},{"line_number":103,"context_line":"                raise TypeError(\"\u0027%s\u0027 is an invalid keyword argument\" % name)"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"    def to_primitive(self):"}],"source_content_type":"text/x-python","patch_set":12,"id":"baada198_b7e2d0d2","line":102,"in_reply_to":"baada198_573254f2","updated":"2014-07-14 19:32:49.000000000","message":"Sure, we can add that as another patchset - this section of code actually changed in this Patchset :)","commit_id":"9a9f2a62722185532633bd2e4a6ae3f1a8098d50"},{"author":{"_account_id":8094,"name":"Vinod Mangalpally","email":"mrvinod@outlook.com","username":"vinodmr"},"change_message_id":"33a1e2442e358c81aa7d5b018616cfa2d890bfd3","unresolved":false,"context_lines":[{"line_number":262,"context_line":"        instance._obj_original_values \u003d \\"},{"line_number":263,"context_line":"            primitive[\u0027designate_object.original_values\u0027]"},{"line_number":264,"context_line":""},{"line_number":265,"context_line":"        return instance"},{"line_number":266,"context_line":""},{"line_number":267,"context_line":"    def __init__(self, *args, **kwargs):"},{"line_number":268,"context_line":"        super(ListObjectMixin, self).__init__(*args, **kwargs)"}],"source_content_type":"text/x-python","patch_set":12,"id":"baada198_7ca3bf42","line":265,"updated":"2014-07-14 19:19:22.000000000","message":"Now that DictObjectMixin and ListObjectMixin inherit from object - how about removing _obj_from_primitive, to_primitive and obj_what_changed from ListObjectMixin and just moving the additional logic to DesignateObject?","commit_id":"9a9f2a62722185532633bd2e4a6ae3f1a8098d50"},{"author":{"_account_id":741,"name":"Kiall Mac Innes","email":"kiall@macinnes.ie","username":"kiall"},"change_message_id":"3c6b5ac110b86342f8231693efe2243b0293a08c","unresolved":false,"context_lines":[{"line_number":262,"context_line":"        instance._obj_original_values \u003d \\"},{"line_number":263,"context_line":"            primitive[\u0027designate_object.original_values\u0027]"},{"line_number":264,"context_line":""},{"line_number":265,"context_line":"        return instance"},{"line_number":266,"context_line":""},{"line_number":267,"context_line":"    def __init__(self, *args, **kwargs):"},{"line_number":268,"context_line":"        super(ListObjectMixin, self).__init__(*args, **kwargs)"}],"source_content_type":"text/x-python","patch_set":12,"id":"baada198_37232006","line":265,"in_reply_to":"baada198_7ca3bf42","updated":"2014-07-14 19:32:49.000000000","message":"Yea - The duplication kinda sucks, but the List specifics (like attributing special meaning to a field called \"objects\" should defiantly be kept in the ListObject class.\n\nI couldn\u0027t come up with a cleaner way to reduce the duplication without adding lots more code :(","commit_id":"9a9f2a62722185532633bd2e4a6ae3f1a8098d50"},{"author":{"_account_id":8094,"name":"Vinod Mangalpally","email":"mrvinod@outlook.com","username":"vinodmr"},"change_message_id":"33a1e2442e358c81aa7d5b018616cfa2d890bfd3","unresolved":false,"context_lines":[{"line_number":268,"context_line":"        super(ListObjectMixin, self).__init__(*args, **kwargs)"},{"line_number":269,"context_line":"        if \u0027objects\u0027 not in kwargs:"},{"line_number":270,"context_line":"            self.objects \u003d []"},{"line_number":271,"context_line":"            self.obj_reset_changes([\u0027objects\u0027])"},{"line_number":272,"context_line":""},{"line_number":273,"context_line":"    def to_primitive(self):"},{"line_number":274,"context_line":"        class_name \u003d self.__class__.__name__"}],"source_content_type":"text/x-python","patch_set":12,"id":"baada198_3765e0e0","line":271,"updated":"2014-07-14 19:19:22.000000000","message":"Hmm. ListObjectMixin call\u0027s DesignateObject\u0027s obj_reset_changes here.  Is there a way to make this more cleaner?","commit_id":"9a9f2a62722185532633bd2e4a6ae3f1a8098d50"},{"author":{"_account_id":741,"name":"Kiall Mac Innes","email":"kiall@macinnes.ie","username":"kiall"},"change_message_id":"3c6b5ac110b86342f8231693efe2243b0293a08c","unresolved":false,"context_lines":[{"line_number":268,"context_line":"        super(ListObjectMixin, self).__init__(*args, **kwargs)"},{"line_number":269,"context_line":"        if \u0027objects\u0027 not in kwargs:"},{"line_number":270,"context_line":"            self.objects \u003d []"},{"line_number":271,"context_line":"            self.obj_reset_changes([\u0027objects\u0027])"},{"line_number":272,"context_line":""},{"line_number":273,"context_line":"    def to_primitive(self):"},{"line_number":274,"context_line":"        class_name \u003d self.__class__.__name__"}],"source_content_type":"text/x-python","patch_set":12,"id":"baada198_37d880ee","line":271,"in_reply_to":"baada198_3765e0e0","updated":"2014-07-14 19:32:49.000000000","message":"I\u0027m not sure I follow? We intentionally call the base DesignateObject method as there is no override in the ListObjectMixin for this method?","commit_id":"9a9f2a62722185532633bd2e4a6ae3f1a8098d50"},{"author":{"_account_id":8094,"name":"Vinod Mangalpally","email":"mrvinod@outlook.com","username":"vinodmr"},"change_message_id":"33a1e2442e358c81aa7d5b018616cfa2d890bfd3","unresolved":false,"context_lines":[{"line_number":306,"context_line":"        if isinstance(index, slice):"},{"line_number":307,"context_line":"            new_obj \u003d self.__class__()"},{"line_number":308,"context_line":"            new_obj.objects \u003d self.objects[index]"},{"line_number":309,"context_line":"            new_obj.obj_reset_changes()"},{"line_number":310,"context_line":"            return new_obj"},{"line_number":311,"context_line":"        return self.objects[index]"},{"line_number":312,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"baada198_f7a6080e","line":309,"updated":"2014-07-14 19:19:22.000000000","message":"Similar to the concern in __init__ -  ListObjectMixin call\u0027s DesignateObject\u0027s obj_reset_changes here.  Is there a way to make this more cleaner?","commit_id":"9a9f2a62722185532633bd2e4a6ae3f1a8098d50"},{"author":{"_account_id":741,"name":"Kiall Mac Innes","email":"kiall@macinnes.ie","username":"kiall"},"change_message_id":"3c6b5ac110b86342f8231693efe2243b0293a08c","unresolved":false,"context_lines":[{"line_number":306,"context_line":"        if isinstance(index, slice):"},{"line_number":307,"context_line":"            new_obj \u003d self.__class__()"},{"line_number":308,"context_line":"            new_obj.objects \u003d self.objects[index]"},{"line_number":309,"context_line":"            new_obj.obj_reset_changes()"},{"line_number":310,"context_line":"            return new_obj"},{"line_number":311,"context_line":"        return self.objects[index]"},{"line_number":312,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"baada198_57e334a3","line":309,"in_reply_to":"baada198_f7a6080e","updated":"2014-07-14 19:32:49.000000000","message":"I\u0027m not sure I follow? We intentionally call the base DesignateObject method as there is no override in the ListObjectMixin for this method?","commit_id":"9a9f2a62722185532633bd2e4a6ae3f1a8098d50"}]}
