/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to breezy/plugins/fastimport/helpers.py

  • Committer: Martin
  • Date: 2017-06-05 20:48:31 UTC
  • mto: This revision was merged to the branch mainline in revision 6658.
  • Revision ID: gzlist@googlemail.com-20170605204831-20accykspjcrx0a8
Apply 2to3 dict fixer and clean up resulting mess using view helpers

Show diffs side-by-side

added added

removed removed

Lines of Context:
181
181
    """Invert a dictionary with keys matching a set of values, turned into lists."""
182
182
    # Based on recipe from ASPN
183
183
    result = {}
184
 
    for k, c in d.iteritems():
 
184
    for k, c in d.items():
185
185
        for v in c:
186
186
            keys = result.setdefault(v, [])
187
187
            keys.append(k)
192
192
    """Invert a dictionary with keys matching each value turned into a list."""
193
193
    # Based on recipe from ASPN
194
194
    result = {}
195
 
    for k, v in d.iteritems():
 
195
    for k, v in d.items():
196
196
        keys = result.setdefault(v, [])
197
197
        keys.append(k)
198
198
    return result