diff -r d7ac10b583fb -r 391b89d04bdd app/soc/logic/dicts.py --- a/app/soc/logic/dicts.py Fri Mar 13 23:10:49 2009 +0000 +++ b/app/soc/logic/dicts.py Fri Mar 13 23:11:16 2009 +0000 @@ -207,3 +207,10 @@ result = ((k, v[new_key]) for k, v in target.iteritems() if v[key]) return dict(result) + +def identity(target): + """Returns a dictionary with the values equal to the keys. + """ + + result = [(i, i) for i in target] + return dict(result)