Python Dict Rehashing

With this in mind I was looking for a way to rehash a dict in python. Things that do not work: d = dict(d) and d.update(d) because the first copies the structure of the dict over, the second does nothing because the dict is the merged dict. What works is d.update(d.iteritems())

Leave a Reply

cogitations driven by wordpress