)]}'
{"oslo/config/cfg.py":[{"author":{"_account_id":1994,"name":"Zhongyue Luo","email":"zhongyue.luo@gmail.com","username":"zyluo"},"change_message_id":"82f665ad9ecf3938bd26b0071dbdb297ce46dec9","unresolved":false,"context_lines":[{"line_number":483,"context_line":""},{"line_number":484,"context_line":""},{"line_number":485,"context_line":"def set_defaults(opts, **kwargs):"},{"line_number":486,"context_line":"    for opt in opts:"},{"line_number":487,"context_line":"        if opt.dest in kwargs:"},{"line_number":488,"context_line":"            opt.default \u003d kwargs[opt.dest]"},{"line_number":489,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAOH%2F%2Fxig%3D","line":486,"updated":"2013-03-28 00:49:19.000000000","message":"Just a suggestion. How about using list comprehension to squeeze the last drop of efficiency?\n\nfor opt in [x for x in opts if x.dest in kwargs]:\n    opt.default \u003d kwargs[opt.dest]","commit_id":"921fd433fb105778610191d442ce490e82aff5a5"},{"author":{"_account_id":5638,"name":"Davanum Srinivas","email":"davanum@gmail.com","username":"dims-v"},"change_message_id":"b9853e9a66c108938c8d35fb064a80b7f4bd12f6","unresolved":false,"context_lines":[{"line_number":483,"context_line":""},{"line_number":484,"context_line":""},{"line_number":485,"context_line":"def set_defaults(opts, **kwargs):"},{"line_number":486,"context_line":"    for opt in opts:"},{"line_number":487,"context_line":"        if opt.dest in kwargs:"},{"line_number":488,"context_line":"            opt.default \u003d kwargs[opt.dest]"},{"line_number":489,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAOH%2F%2FxC8%3D","line":486,"in_reply_to":"AAAAOH%2F%2Fxig%3D","updated":"2013-03-28 12:30:09.000000000","message":"Zhongyue Luo, in the code snippet i see 2 for loops first one collects the things we can override and then we actually do the over rider in the other loop. So not sure if we are squeezing performance out of it either. So let\u0027s just let it be. Typically we are not dealing with a large number of kwargs or opts so should not provide any appreciable difference either way. So, i\u0027d like to leave it as is with the KISS principle. ok?","commit_id":"921fd433fb105778610191d442ce490e82aff5a5"}]}
