)]}'
{"oslo/config/cfg.py":[{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"3c0c97b3b411f72820f4fdc776f578f995e96025","unresolved":false,"context_lines":[{"line_number":1440,"context_line":"            name \u003d name if group_name is None else group_name + \u0027_\u0027 + name"},{"line_number":1441,"context_line":"            value \u003d getattr(self, name, None)"},{"line_number":1442,"context_line":"            if value is not None:"},{"line_number":1443,"context_line":"                # argparse ignores default\u003dNone for nargs\u003d\u0027*\u0027"},{"line_number":1444,"context_line":"                if positional and not value:"},{"line_number":1445,"context_line":"                    raise KeyError"},{"line_number":1446,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"1ae5cdf2_046a3781","line":1443,"updated":"2014-06-16 06:13:47.000000000","message":"Note this comment refers to the case of a multistr opt with default\u003dNone - without this line we\u0027d see [] mistakenly used as the default\n\nI\u0027ve pushed I66f5df6e622a66faa1d00ee0846cbec5eb119283 to make sure we have a test for this","commit_id":"122b4b6785e4a618b323d7baa455559524788f96"},{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"960a1b77dfb211b51b9d93c9c7b73af54e80ae9d","unresolved":false,"context_lines":[{"line_number":1440,"context_line":"            name \u003d name if group_name is None else group_name + \u0027_\u0027 + name"},{"line_number":1441,"context_line":"            value \u003d getattr(self, name, None)"},{"line_number":1442,"context_line":"            if value is not None:"},{"line_number":1443,"context_line":"                # argparse ignores default\u003dNone for nargs\u003d\u0027*\u0027"},{"line_number":1444,"context_line":"                if positional and not value:"},{"line_number":1445,"context_line":"                    raise KeyError"},{"line_number":1446,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"1ae5cdf2_16941b8b","line":1443,"in_reply_to":"1ae5cdf2_046a3781","updated":"2014-06-16 12:55:39.000000000","message":"Maybe I should update the comment to make it clearer. Something like:\n\n  # A multstr opt with default\u003dNone will result in an empty list as a default\n\nThe comment really clarifies the \u0027if\u0027 statement that follows so it should help give it context.","commit_id":"122b4b6785e4a618b323d7baa455559524788f96"},{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"00a0be7941be4bd26b05d664d7e7896f2d644d39","unresolved":false,"context_lines":[{"line_number":1440,"context_line":"            name \u003d name if group_name is None else group_name + \u0027_\u0027 + name"},{"line_number":1441,"context_line":"            value \u003d getattr(self, name, None)"},{"line_number":1442,"context_line":"            if value is not None:"},{"line_number":1443,"context_line":"                # argparse ignores default\u003dNone for nargs\u003d\u0027*\u0027"},{"line_number":1444,"context_line":"                if positional and not value:"},{"line_number":1445,"context_line":"                    raise KeyError"},{"line_number":1446,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"1ae5cdf2_96b4abd5","line":1443,"in_reply_to":"1ae5cdf2_16941b8b","updated":"2014-06-16 13:07:11.000000000","message":"Yeah, maybe just append \"and returns []\" to the current comment","commit_id":"122b4b6785e4a618b323d7baa455559524788f96"},{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"feb98a3b19ae42441148d1acb5754b2d7130c3a2","unresolved":false,"context_lines":[{"line_number":1440,"context_line":"            name \u003d name if group_name is None else group_name + \u0027_\u0027 + name"},{"line_number":1441,"context_line":"            value \u003d getattr(self, name, None)"},{"line_number":1442,"context_line":"            if value is not None:"},{"line_number":1443,"context_line":"                # argparse ignores default\u003dNone for nargs\u003d\u0027*\u0027"},{"line_number":1444,"context_line":"                if positional and not value:"},{"line_number":1445,"context_line":"                    raise KeyError"},{"line_number":1446,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"1ae5cdf2_24f5caca","line":1443,"in_reply_to":"1ae5cdf2_96b4abd5","updated":"2014-06-27 01:21:34.000000000","message":"Done","commit_id":"122b4b6785e4a618b323d7baa455559524788f96"},{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"3c0c97b3b411f72820f4fdc776f578f995e96025","unresolved":false,"context_lines":[{"line_number":1442,"context_line":"            if value is not None:"},{"line_number":1443,"context_line":"                # argparse ignores default\u003dNone for nargs\u003d\u0027*\u0027"},{"line_number":1444,"context_line":"                if positional and not value:"},{"line_number":1445,"context_line":"                    raise KeyError"},{"line_number":1446,"context_line":""},{"line_number":1447,"context_line":"                return value"},{"line_number":1448,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"1ae5cdf2_246733b9","line":1445,"updated":"2014-06-16 06:13:47.000000000","message":"This works because we don\u0027t register the deprecated names of CLI options with the parser, but it makes me pause when reading the code - I think just doing \u0027continue\u0027 here would see more obvious","commit_id":"122b4b6785e4a618b323d7baa455559524788f96"},{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"960a1b77dfb211b51b9d93c9c7b73af54e80ae9d","unresolved":false,"context_lines":[{"line_number":1442,"context_line":"            if value is not None:"},{"line_number":1443,"context_line":"                # argparse ignores default\u003dNone for nargs\u003d\u0027*\u0027"},{"line_number":1444,"context_line":"                if positional and not value:"},{"line_number":1445,"context_line":"                    raise KeyError"},{"line_number":1446,"context_line":""},{"line_number":1447,"context_line":"                return value"},{"line_number":1448,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"1ae5cdf2_d65633ce","line":1445,"in_reply_to":"1ae5cdf2_246733b9","updated":"2014-06-16 12:55:39.000000000","message":"Is there a case where you\u0027d want to exhaust the loop even after the test would have failed? If not then I\u0027m not sure \u0027continue\u0027 is correct because that is what it would imply.\n\nThis change is really just a refactoring that shouldn\u0027t actually change the logic. Making this a \u0027continue\u0027 would change the logic.","commit_id":"122b4b6785e4a618b323d7baa455559524788f96"},{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"feb98a3b19ae42441148d1acb5754b2d7130c3a2","unresolved":false,"context_lines":[{"line_number":1442,"context_line":"            if value is not None:"},{"line_number":1443,"context_line":"                # argparse ignores default\u003dNone for nargs\u003d\u0027*\u0027"},{"line_number":1444,"context_line":"                if positional and not value:"},{"line_number":1445,"context_line":"                    raise KeyError"},{"line_number":1446,"context_line":""},{"line_number":1447,"context_line":"                return value"},{"line_number":1448,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"1ae5cdf2_641272fe","line":1445,"in_reply_to":"1ae5cdf2_561ea3bc","updated":"2014-06-27 01:21:34.000000000","message":"You\u0027re right. I misread the for-loop/try-except-pass. A continue is effectively the same as the original logic. The \u0027self.default\u0027 would cause an AttributeError and since it is caught *inside* of the for-loop it just starts on the next iteration.","commit_id":"122b4b6785e4a618b323d7baa455559524788f96"},{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"00a0be7941be4bd26b05d664d7e7896f2d644d39","unresolved":false,"context_lines":[{"line_number":1442,"context_line":"            if value is not None:"},{"line_number":1443,"context_line":"                # argparse ignores default\u003dNone for nargs\u003d\u0027*\u0027"},{"line_number":1444,"context_line":"                if positional and not value:"},{"line_number":1445,"context_line":"                    raise KeyError"},{"line_number":1446,"context_line":""},{"line_number":1447,"context_line":"                return value"},{"line_number":1448,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"1ae5cdf2_561ea3bc","line":1445,"in_reply_to":"1ae5cdf2_d65633ce","updated":"2014-06-16 13:07:11.000000000","message":"Well, firstly, it\u0027s not just refactoring - you are changing the logic ... you\u0027re fixing it!\n\nThe way I read this loop is \"loop over the names and return the first name which has a value associated with it\"\n\nThe positional multistr case isn\u0027t different - we\u0027ve been given [] as a value and now we\u0027re like \"oh, in this particular case that\u0027s not actually a valid value, so continue onto the next name\"\n\nNow, I\u0027m not sure that that case can ever happen with positional arguments so \"raise KeyError\" probably works fine ...  but if it was possible, we\u0027d want continue here","commit_id":"122b4b6785e4a618b323d7baa455559524788f96"}]}
