)]}'
{"neutron/plugins/ml2/plugin.py":[{"author":{"_account_id":20378,"name":"Trevor McCasland","email":"TM2086@att.com","username":"twm2016"},"change_message_id":"196a19da76d9f585cb2b42f88af7a14be64f64c7","unresolved":false,"context_lines":[{"line_number":855,"context_line":""},{"line_number":856,"context_line":"            for net in nets:"},{"line_number":857,"context_line":"                net[api.MTU] \u003d self._get_network_mtu(net)"},{"line_number":858,"context_line":""},{"line_number":859,"context_line":"        return (nets if not fields else"},{"line_number":860,"context_line":"                [self._fields(net, fields) for net in nets])"},{"line_number":861,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"9a89bdaa_5de898b4","line":858,"updated":"2016-09-06 20:06:29.000000000","message":"for readability, I would like to see\nif fields:\n    nets \u003d [self._fields(net, fields) for net in nets]\nreturn nets","commit_id":"1adb3dfd59cab9d4621ebaee79ee21c6bd340419"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"fc42b7afe8a8e41bd449d9d412589a0c17a39769","unresolved":false,"context_lines":[{"line_number":856,"context_line":"            for net in nets:"},{"line_number":857,"context_line":"                net[api.MTU] \u003d self._get_network_mtu(net)"},{"line_number":858,"context_line":""},{"line_number":859,"context_line":"        return (nets if not fields else"},{"line_number":860,"context_line":"                [self._fields(net, fields) for net in nets])"},{"line_number":861,"context_line":""},{"line_number":862,"context_line":"    def _delete_ports(self, context, port_ids):"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a89bdaa_32ce9e2e","line":859,"updated":"2016-09-06 22:08:41.000000000","message":"the \u0027_fields\u0027 function already returns what is passed in without constructing a new dictionary. an iteration over a list is negligible. this isn\u0027t worth the extra code.\n\non my dev machine it\u0027s a little over 9 miliseconds to call a function like this on a list of 100,000 dictionaries.\n\npython -m timeit -s \u0027l \u003d map(lambda x: {x: x}, range(100000))\u0027 \u0027map(lambda i: i, l)\u0027\n100 loops, best of 3: 9.08 msec per loop\n\nSub-millisecond on 10,000\n\npython -m timeit -s \u0027l \u003d map(lambda x: {x: x}, range(10000))\u0027 \u0027map(lambda i: i, l)\u0027\n1000 loops, best of 3: 787 usec per loop","commit_id":"1adb3dfd59cab9d4621ebaee79ee21c6bd340419"}]}
