• Vincent Pelletier's avatar
    CatalogTool: Assorted readability improvements. · da29e93c
    Vincent Pelletier authored
    Fix a misnamed local.
    Use iteritems.
    Move variables next to the loop they act on.
    Rewrite comments to better reflect the intention when it is not obvious in
    the implementation.
    Move a loop-invariant out of loop ((user, role) not in optimized_role_set).
    Do not use set.update on an iterable constructed just for the call, call
    set.add on each item.
CatalogTool.py 45 KB