3 ms·
You could get a last slight bit of juice from localising the closed over variables by binding them as default parameters e.g. def whitelist_filter(bid_requ
by masklinn 12y ago
You could get a last slight bit of juice from localising the closed over variables by binding them as default parameters e.g.
def whitelist_filter(bid_request):
return not categories.isdisjoint(bid_request["categories"])
to
def whitelist_filter(bid_request, categories=categories):
return not categories.isdisjoint(bid_request["categories"])