)]}'
{"mistral/engine/utils.py":[{"author":{"_account_id":9408,"name":"Michal Gershenzon","email":"michal.gershenzon@gmail.com","username":"Mgershen"},"change_message_id":"f45191e610592c0c01c268082ff9bb601e079a6b","unresolved":false,"context_lines":[{"line_number":31,"context_line":"    missing_params \u003d []"},{"line_number":32,"context_line":"    unexpected_params \u003d copy.deepcopy(list((actual_input or {}).keys()))"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"    for p_name, p_value in expected_input.items():"},{"line_number":35,"context_line":"        if p_value is utils.NotDefined and p_name not in unexpected_params:"},{"line_number":36,"context_line":"            missing_params.append(str(p_name))"},{"line_number":37,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"3a1ff146_bd0c8f43","line":34,"range":{"start_line":34,"start_character":16,"end_line":34,"end_character":23},"updated":"2017-03-15 10:01:36.000000000","message":"soft: maybe default_value/default_val/p_default is more clear? right now it looks like expected parameter value which might be confusing.","commit_id":"db503fea47c55633a7186c188b3a6a95528fab9f"},{"author":{"_account_id":9408,"name":"Michal Gershenzon","email":"michal.gershenzon@gmail.com","username":"Mgershen"},"change_message_id":"32e585442f3d5aefb850f9f2d24bebdb7b08f8ac","unresolved":false,"context_lines":[{"line_number":31,"context_line":"    missing_params \u003d []"},{"line_number":32,"context_line":"    unexpected_params \u003d copy.deepcopy(list((actual_input or {}).keys()))"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"    for p_name, p_value in expected_input.items():"},{"line_number":35,"context_line":"        if p_value is utils.NotDefined and p_name not in unexpected_params:"},{"line_number":36,"context_line":"            missing_params.append(str(p_name))"},{"line_number":37,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"3a1ff146_5282a501","line":34,"range":{"start_line":34,"start_character":16,"end_line":34,"end_character":23},"in_reply_to":"3a1ff146_92417d3c","updated":"2017-03-15 10:41:09.000000000","message":"you can make it def_val, it\u0027s the same length as p_value.","commit_id":"db503fea47c55633a7186c188b3a6a95528fab9f"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"e0510e3295786b4b5d466d01c55637a29af5352c","unresolved":false,"context_lines":[{"line_number":31,"context_line":"    missing_params \u003d []"},{"line_number":32,"context_line":"    unexpected_params \u003d copy.deepcopy(list((actual_input or {}).keys()))"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"    for p_name, p_value in expected_input.items():"},{"line_number":35,"context_line":"        if p_value is utils.NotDefined and p_name not in unexpected_params:"},{"line_number":36,"context_line":"            missing_params.append(str(p_name))"},{"line_number":37,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"3a1ff146_92417d3c","line":34,"range":{"start_line":34,"start_character":16,"end_line":34,"end_character":23},"in_reply_to":"3a1ff146_bd0c8f43","updated":"2017-03-15 10:14:52.000000000","message":"Well, this is a local variable of the cycle, I usually make them as short as possible. Their meaning can be pretty easily understood from the context.","commit_id":"db503fea47c55633a7186c188b3a6a95528fab9f"},{"author":{"_account_id":9408,"name":"Michal Gershenzon","email":"michal.gershenzon@gmail.com","username":"Mgershen"},"change_message_id":"f45191e610592c0c01c268082ff9bb601e079a6b","unresolved":false,"context_lines":[{"line_number":32,"context_line":"    unexpected_params \u003d copy.deepcopy(list((actual_input or {}).keys()))"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"    for p_name, p_value in expected_input.items():"},{"line_number":35,"context_line":"        if p_value is utils.NotDefined and p_name not in unexpected_params:"},{"line_number":36,"context_line":"            missing_params.append(str(p_name))"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"        if p_name in unexpected_params:"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a1ff146_ef31eeed","line":35,"range":{"start_line":35,"start_character":57,"end_line":35,"end_character":74},"updated":"2017-03-15 10:01:36.000000000","message":"soft: maybe use actual_input instead of unexpected_params? As far as I understand, they are currently the same and I think by using actual_input, the line will be more readable.","commit_id":"db503fea47c55633a7186c188b3a6a95528fab9f"},{"author":{"_account_id":9408,"name":"Michal Gershenzon","email":"michal.gershenzon@gmail.com","username":"Mgershen"},"change_message_id":"32e585442f3d5aefb850f9f2d24bebdb7b08f8ac","unresolved":false,"context_lines":[{"line_number":32,"context_line":"    unexpected_params \u003d copy.deepcopy(list((actual_input or {}).keys()))"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"    for p_name, p_value in expected_input.items():"},{"line_number":35,"context_line":"        if p_value is utils.NotDefined and p_name not in unexpected_params:"},{"line_number":36,"context_line":"            missing_params.append(str(p_name))"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"        if p_name in unexpected_params:"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a1ff146_655c3d26","line":35,"range":{"start_line":35,"start_character":57,"end_line":35,"end_character":74},"in_reply_to":"3a1ff146_5220e59b","updated":"2017-03-15 10:41:09.000000000","message":"IMHO, this is no coincidence. What this line does is making sure we will have a value for the input, either the default value or the actual value passed by the user. Otherwise, it is missing.\n\nUsing `unexpected_params` just hides the logic. checking if p_name is not unexpected make it sound like we are checking if it is expected, but what you are checking is - if it was not passed.\n\nThe way I see it you need `unexpected_params` to find the unexpected params. IMHO you wouldn\u0027t even create this variable if you only needed to return the missing parameters. \nIf in the future we will allow unexpected params, think how the code will look.\n\nAbout the fact that you created 2 lists in the beginning - I don\u0027t see how it is relevant, since you don\u0027t manipulate the unexpected_params list in this code block. In the beginning you also received 2 parameters passed to the function as arguments.","commit_id":"db503fea47c55633a7186c188b3a6a95528fab9f"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"e0510e3295786b4b5d466d01c55637a29af5352c","unresolved":false,"context_lines":[{"line_number":32,"context_line":"    unexpected_params \u003d copy.deepcopy(list((actual_input or {}).keys()))"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"    for p_name, p_value in expected_input.items():"},{"line_number":35,"context_line":"        if p_value is utils.NotDefined and p_name not in unexpected_params:"},{"line_number":36,"context_line":"            missing_params.append(str(p_name))"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"        if p_name in unexpected_params:"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a1ff146_5220e59b","line":35,"range":{"start_line":35,"start_character":57,"end_line":35,"end_character":74},"in_reply_to":"3a1ff146_ef31eeed","updated":"2017-03-15 10:14:52.000000000","message":"Well, the logic in of naming is basically result oriented: in the beginning I create two lists that I\u0027m going to return at the end. It\u0027s just a coincidence that one of them is initialized with actual input keys. It\u0027s just because of the impl I chose here.","commit_id":"db503fea47c55633a7186c188b3a6a95528fab9f"}]}
